OFFSET
1,2
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..2000
MATHEMATICA
NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] > FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]]]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]]]]]]; t1 = NestList[ NextPalindrome, 0, 2800]; t2 = Select[ Union[Flatten[Table[n^3 - m^3, {n, 900}, {m, n - 1}]]], # < 2*10^6 &]; Intersection[t1, t2] - Robert G. Wilson v
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
More terms from Robert G. Wilson v, Jul 14 2005
STATUS
approved