login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Trajectory of 77 under the Reverse and Add! operation carried out in base 2.
13

%I #29 Jun 21 2023 09:12:12

%S 77,166,267,684,897,1416,1557,2904,3333,5904,6189,11952,12813,24096,

%T 24669,48480,50205,97344,98493,195264,198717,391296,393597,783744,

%U 790653,1569024,1573629,3140352,3154173,6283776,6292989,12572160

%N Trajectory of 77 under the Reverse and Add! operation carried out in base 2.

%C 22 is the smallest number whose base 2 trajectory (A061561) provably does not contain a palindrome. 77 is the next number (cf. A075252) with a completely different trajectory which has this property. 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.

%C lim_{n -> infinity} a(n)/a(n-1) = 2 for n mod 2 = 1.

%C lim_{n -> infinity} a(n)/a(n-1) = 1 for n mod 2 = 0.

%C Interleaving of A176632, 2*A176633, 3*A176634, 12*A176635.

%C From _A.H.M. Smeets_, Feb 11 2019: (Start)

%C Pattern with cycle length 4 in binary representation, represented by contextfree grammars with production rules:

%C S_a -> 10 T_a 00, T_a -> 1 T_a 0 | 1100010;

%C S_b -> 11 T_b 01, T_b -> 0 T_b 1 | 0000101;

%C S_c -> 10 T_c 000, T_c -> 1 T_c 0 | 1101011;

%C S_d -> 11 T_d 101, T_d -> 0 T_d 1 | 0100000;

%C the trajectory is similar to that of 22 (see A058042) except for the stopping strings in T_a, T_b, T_c and T_d. (End)

%H Reinhard Zumkeller, <a href="/A075253/b075253.txt">Table of n, a(n) for n = 0..1000</a>

%H Klaus Brockhaus, <a href="/A058042/a058042.txt">On the 'Reverse and Add!' algorithm in base 2</a>

%H <a href="/index/Res#RAA">Index entries for sequences related to Reverse and Add!</a>

%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0, 3, 0, 0, 0, -6, 0, 4).

%F a(0) = 77; a(1) = 166; a(2) = 267; for n > 2 and

%F n = 3 (mod 4): a(n) = 48*2^(2*k)-21*2^k where k = (n+5)/4;

%F n = 0 (mod 4): a(n) = 48*2^(2*k)+33*2^k-3 where k = (n+4)/4;

%F n = 1 (mod 4): a(n) = 96*2^(2*k)-30*2^k where k = (n+3)/4;

%F n = 2 (mod 4): a(n) = 96*2^(2*k)+6*2^k-3 where k = (n+2)/4.

%F G.f.: (77+166*x+36*x^2+186*x^3+96*x^4-636*x^5-672*x^6-348*x^7-44*x^8 +632*x^9+504*x^10) / ((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4)).

%F G.f. for the sequence starting at a(3): 3*x^3*(228+299*x-212*x^2 -378*x^3-448*x^4-446*x^5+432*x^6+524*x^7) / ((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4)).

%F a(n+1) = A055944(a(n)). - _Reinhard Zumkeller_, Apr 21 2013

%e 267 (decimal) = 100001011 -> 100001011 + 110100001 = 1010101100 = 684 (decimal).

%p seq(coeff(series((77+166*x+36*x^2+186*x^3+96*x^4-636*x^5-672*x^6-348*x^7-44*x^8+632*x^9+504*x^10)/((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4)),x,n+1), x, n), n = 0 .. 40); # _Muniru A Asiru_, Feb 12 2019

%t CoefficientList[Series[(77+166*x+36*x^2+186*x^3+96*x^4-636*x^5-672*x^6 -348*x^7-44*x^8 +632*x^9+504*x^10)/((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4)), {x,0,40}], x] (* _G. C. Greubel_, Feb 11 2019 *)

%t NestWhileList[# + IntegerReverse[#, 2] &, 77, # !=

%t IntegerReverse[#, 2] &, 1, 31] (* _Robert Price_, Oct 18 2019 *)

%o (PARI) {m=77; stop=34; c=0; while(c<stop,print1(k=m,","); rev=0; while(k>0,d=divrem(k,2); k=d[1]; rev=2*rev+d[2]); c++; m=m+rev)}

%o (Magma) trajectory:=function(init, steps, base) S:=[init]; a:=S[1]; for n in [1..steps] do a+:=Seqint(Reverse(Intseq(a,base)),base); Append(~S, a); end for; return S; end function; trajectory(77, 31, 2);

%o (Haskell)

%o a075253 n = a075253_list !! n

%o a075253_list = iterate a055944 77 -- _Reinhard Zumkeller_, Apr 21 2013

%o (Sage) ((77+166*x+36*x^2+186*x^3+96*x^4-636*x^5-672*x^6 -348*x^7-44*x^8 +632*x^9+504*x^10)/((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4))).series(x, 40).coefficients(x, sparse=False) # _G. C. Greubel_, Feb 11 2019

%Y Cf. A061561 (trajectory of 22 in base 2), A075268 (trajectory of 442 in base 2), A077076 (trajectory of 537 in base 2), A077077 (trajectory of 775 in base 2), A066059 (trajectory of n in base 2 presumably does not reach a palindrome), A075252 (trajectory of n in base 2 does not reach a palindrome and presumably does not join the trajectory of any term m < n), A092210 (trajectory of n in base 2 presumably does not join the trajectory of any m < n).

%Y Cf. A176632 (a(4*n)), A176633 (a(4*n+1)/2), A176634 (a(4*n+2)/3), A176635 (a(4*n+3)/12).

%K base,nonn

%O 0,1

%A _Klaus Brockhaus_, Sep 10 2002

%E Three comments added, g.f. edited, MAGMA program and crossrefs added by _Klaus Brockhaus_, Apr 25 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 23:55 EDT 2024. Contains 376078 sequences. (Running on oeis4.)