A075268 Trajectory of 442 under the Reverse and Add! operation carried out in base 2.
442, 629, 1326, 2259, 5508, 6585, 11628, 15129, 24912, 26259, 52038, 77337, 155394, 221931, 442374, 639009, 1179738, 1917027, 3539130, 5062869, 10666542, 18285939, 45369156, 54513657, 96444396, 125792217, 207562704, 220034931
Offset: 0
Examples
442 (decimal) = 110111010 -> 110111010 + 010111011 = 1001110101 = 629 (decimal).
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- Klaus Brockhaus, On the 'Reverse and Add!' algorithm in base 2
- Index entries for sequences related to Reverse and Add!
Crossrefs
Programs
-
Haskell
a075268 n = a075268_list !! n a075268_list = iterate a055944 442 -- Reinhard Zumkeller, Apr 21 2013
-
Magma
trajectory:=function(init, steps, base) a:=init; S:=[a]; for n in [1..steps] do a+:=Seqint(Reverse(Intseq(a,base)),base); Append(~S, a); end for; return S; end function; trajectory(442, 28, 2);
-
Mathematica
NestWhileList[# + IntegerReverse[#, 2] &, 442, # != IntegerReverse[#, 2] &, 1, 27] (* Robert Price, Oct 18 2019 *)
-
PARI
trajectory(n,steps) = {local(v, k=n); for(j=0, steps, print1(k, ", "); v=binary(k); k+=sum(j=1, #v, 2^(j-1)*v[j]))}; trajectory(442,28);
Formula
a(0), ..., a(28) as above; a(29) = 703932681; a(30) =1310348526; a(31) = 2309980455; a(32) = 6143702712; a(33) = 7131271077; a(34) = 12699398352; a(35) = 13441412493; for n > 35 and
n = 0 (mod 4): a(n) = 3*2^(2*k+23)-12576771*2^k where k = (n-16)/4;
n = 1 (mod 4): a(n) = 3*2^(2*k+23)+12576771*2^k-3 where k = (n-17)/4;
n = 2 (mod 4): a(n) = 6*2^(2*k+23)-12576771*2^k where k = (n-18)/4;
n = 3 (mod 4): a(n) = 6*2^(2*k+23)+37730313*2^k-3 where k = (n-19)/4.
G.f.: (442+629*x+372*x^3+1530*x^4-192*x^5-2244*x^6-852*x^7-3784*x^8-8090*x^9 +5046*x^10+29034*x^11+47016*x^12+54354*x^13+79152*x^14+70254*x^15+65196*x^16 +358986*x^17+724128*x^18+334026*x^19+2081820*x^20+6043662*x^21+18678462*x^22+8601966*x^23 -23147244*x^24-15039648*x^25 -31927752*x^26-67877562*x^27+43880046*x^28+297766074*x^29 +396480108*x^30+734881086*x^31+3072255774*x^32+1018370430*x^33-3939844260*x^34-4608944376*x^35 -6616834356*x^36-3107825028*x^37+6655931736*x^38+7777900872*x^39+484428384*x^40 -2233413600*x^41-62899200*x^42+188697600*x^43) / ((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4)).
G.f. for the sequence starting at a(36): 3*x^36*(8455782368+8724086815*x -8321630144*x^2-8589934590*x^3-17045716960*x^4-18118934750*x^5+16911564736*x^6 +17984782524*x^7) / ((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4)).
a(n+1) = A055944(a(n)). - Reinhard Zumkeller, Apr 21 2013
Extensions
Comment edited and three comments added, g.f. edited, PARI program revised, MAGMA program and crossrefs added by Klaus Brockhaus, May 07 2010
Comments