OFFSET
0,1
COMMENTS
LINKS
FORMULA
a(0), ..., a(7) as above; for n > 7 and n = 2 (mod 6): a(n) = 5*4^(2*k+9)+3836395*4^k-15 where k = (n+4)/6; n = 3 (mod 6): a(n) = 10*4^(2*k+9)+2450070*4^k-10 where k = (n+3)/6; n = 4 (mod 6): a(n) = 20*4^(2*k+9)-326420*4^k where k = (n+2)/6; n = 5 (mod 6): a(n) = 20*4^(2*k+9)+3544540*4^k-15 where k = (n+1)/6; n = 0 (mod 6): a(n) = 40*4^(2*k+9)+1927800*4^k-10 where k = n/6; n = 1 (mod 6): a(n) = 80*4^(2*k+9)-322580*4^k where k = (n-1)/6. G.f.: -3*(668508000*x^19+444361200*x^18+222142800*x^17-528080680*x^16-356464620*x^15 -125753060*x^14-299532884*x^13-188180432*x^12-143040640*x^11+128992350*x^10+90219415*x^9 +38288125*x^8+28112975*x^7+6666425*x^6+5752375*x^5+424135*x^4+3044705*x^3+2610355*x^2 + 1576104*x+353277)/((x-1)*(x^2+x+1)*(2*x^3-1)*(2*x^3+1)*(4*x^3-1))
EXAMPLE
1059831 (decimal) = 10002233313 -> 10002233313 + 31333220001 = 102002113320 = 4728312 (decimal).
MATHEMATICA
NestWhileList[# + IntegerReverse[#, 4] &, 1059831, # != IntegerReverse[ #, 4] &, 1, 23] (* Robert Price, Oct 19 2019 *)
PROG
(PARI) {m=1059831; stop=19; c=0; while(c<stop, print1(k=m, ", "); rev=0; while(k>0, d=divrem(k, 4); k=d[1]; rev=4*rev+d[2]); c++; m=m+rev)}
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Klaus Brockhaus, Oct 03 2002
STATUS
approved