OFFSET
0,1
COMMENTS
1059774 = A075421(1096) is the fourth term 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(16) onward; the g.f. for the complete sequence is known but nearly twice as big.
LINKS
FORMULA
a(0), ..., a(15) as above; for n > 15 and n = 4 (mod 6): a(n) = 5*4^(2*k+12)-5237765*4^k where k = (n+2)/6; n = 5 (mod 6): a(n) = 5*4^(2*k+12)+246174955*4^k-15 where k = (n+1)/6; n = 0 (mod 6): a(n) = 10*4^(2*k+12)+157132950*4^k-10 where k = n/6; n = 1 (mod 6): a(n) = 20*4^(2*k+12)-20951060*4^k where k = (n-1)/6; n = 2 (mod 6): a(n) = 20*4^(2*k+12)+230461660*4^k-15 where k = (n-2)/6; n = 3 (mod 6): a(n) = 40*4^(2*k+12)+125706360*4^k-10 where k = (n-3)/6. G.f.: -15*(185397326496*x^11+95559181296*x^10+91268404224*x^9-183251937960*x^8-92341098492*x^7 -91268404224*x^6-48628806952*x^5-27174921532*x^4-22884144448*x^3+46483418410*x^2 +23956838719*x+22884144448)/((x-1)*(x^2+x+1)*(2*x^3-1)*(2*x^3+1)*(4*x^3-1))
EXAMPLE
1059774 (decimal) = 10002232332 -> 10002232332 + 23323220001 = 33332112333 = 4187583 (decimal).
MATHEMATICA
NestWhileList[# + IntegerReverse[#, 4] &, 1059774, # !=
IntegerReverse[#, 4] &, 1, 23] (* Robert Price, Oct 18 2019 *)
PROG
(PARI) {m=1059774; 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