Date: Thu, 24 May 2007 21:56:35 -0400 From: Keith Schneider (schneidk(AT)email.unc.edu) To: njas@research.att.com Subject: Re: A052065-8 The following Mathematica code generates the first 25 terms of each of A052065-8. It runs in about ten minutes on my machine. Remove[A052065Term, A052067Term] ConsecDigitsQ[diglist_] := Piecewise[{{(! (diglist[[1]] == diglist[[2]])) && \ ConsecDigitsQ[Delete[diglist, 1]], Length[diglist] > 1}}, True]; OneOffDigitsQ[diglist_] := Piecewise[{{(! ( diglist[[1]] == diglist[[3]])) && OneOffDigitsQ[Delete[diglist, \ 1]], Length[diglist] > 2}}, True]; PalFreeQ[n_] := ConsecDigitsQ[IntegerDigits[n]] && OneOffDigitsQ[IntegerDigits[n]]; StartVal65[n_] := Floor[Floor[(10^(2n)*340/333)]^(1/2)]; A052065Term[n_] := A052065Term[n] = Module[{ i}, i = StartVal65[n]; While[! PalFreeQ[i^2], i++]; i]; A052066Term[n_] := A052065Term[n]^2; StartVal67[n_] := Floor[Floor[(10^(3n)*340/333)]^(1/3)]; A052067Term[ n_] := A052067Term[n] = Module[{i}, i = StartVal67[n]; While[! PalFreeQ[i^3], i++]; i]; A052068Term[n_] := A052067Term[n]^3; Table[A052065Term[i], {i, 1, 25}] // TableForm Table[A052066Term[i], {i, 1, 25}] // TableForm Table[A052067Term[i], {i, 1, 25}] // TableForm Table[A052068Term[i], {i, 1, 25}] // TableForm