OFFSET
1,1
LINKS
MATHEMATICA
limit = 10^3; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
Select[Range[1000],
Length@NestWhileList[# + IntegerReverse[#, 4] &, #, # !=
IntegerReverse[#, 4] &, 1, limit] == limit + 1 &] (* Robert Price, Oct 16 2019 *)
PROG
(PARI) {stop=1000; for(n=1, 980, k=n; c=0; while(c<stop, a=k; rev=0; while(a>0, d=divrem(a, 4); a=d[1]; rev=4*rev+d[2]); if(rev==k, c=stop+1, k=k+rev; c++)); if(c==stop, print1(n, ", ")))}
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Klaus Brockhaus, Sep 18 2002
EXTENSIONS
Offset changed to 1 by A.H.M. Smeets, Feb 10 2019
STATUS
approved