OFFSET
0,1
COMMENTS
266718 = A075421(358) is the smallest term > 318 of A075421 whose base 4 trajectory provably does not contain a palindrome. A proof along the lines of Klaus Brockhaus, On the 'Reverse and Add!' algorithm in base 2, can be based on the formula given below. - The generating function given describes the sequence from a(26) onward; the g.f. for the complete sequence is known but more than twice as big.
LINKS
FORMULA
a(0), ..., a(18) as above; a(19) = 2780823717750; a(20) = 5492189757120; a(21) = 5749636151985; a(22) = 11156010444150; a(23) = 21968759028480; a(24) = 22226205423345; a(25) = 44109148986870; for n > 25 and n = 2 (mod 6): a(n) = 5*4^(2*k+14)-83865605*4^k where k = (n-2)/6; n = 3 (mod 6): a(n) = 5*4^(2*k+14)+3941683435*4^k-15 where k = (n-3)/6; n = 4 (mod 6): a(n) = 10*4^(2*k+14)+2515968150*4^k-10 where k = (n-4)/6; n = 5 (mod 6): a(n) = 20*4^(2*k+14)-335462420*4^k where k = (n-5)/6; n = 0 (mod 6): a(n) = 20*4^(2*k+14)+3690086620*4^k-15 where k = (n-6)/6; n = 1 (mod 6): a(n) = 40*4^(2*k+14)+2012774520*4^k-10 where k = (n-7)/6. G.f.: -15*(47049901525664*x^11+23708157972464*x^10+23433347158016*x^9-46912496118440*x^8-23502049861628*x^7-23433347158016*x^6-11908468626600*x^5-6137441522940*x^4-5862630708480*x^3+11771063219370*x^2+5931333412095*x+5862630708480)/((x-1)*(x^2+x+1)*(2*x^3-1)*(2*x^3+1)*(4*x^3-1))
EXAMPLE
266718 (decimal) = 1001013132 -> 1001013132 + 2313101001 = 3320120133 = 1017375 (decimal).
MATHEMATICA
NestWhileList[# + IntegerReverse[#, 4] &, 266718, # !=
IntegerReverse[#, 4] &, 1, 23] (* Robert Price, Oct 18 2019 *)
PROG
(PARI) {m=266718; 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, Sep 18 2002
STATUS
approved