cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 20 results. Next

A061561 Trajectory of 22 under the Reverse and Add! operation carried out in base 2.

Original entry on oeis.org

22, 35, 84, 105, 180, 225, 360, 405, 744, 837, 1488, 1581, 3024, 3213, 6048, 6237, 12192, 12573, 24384, 24765, 48960, 49725, 97920, 98685, 196224, 197757, 392448, 393981, 785664, 788733, 1571328, 1574397, 3144192, 3150333, 6288384, 6294525
Offset: 0

Views

Author

N. J. A. Sloane, May 18 2001

Keywords

Comments

Sequence A058042 written in base 10. 22 is the smallest number whose base 2 trajectory does not contain a palindrome.
lim_{n -> infinity} a(n)/a(n-1) = 2 for n mod 2 = 0.
lim_{n -> infinity} a(n)/a(n-1) = 1 for n mod 2 = 1. - Klaus Brockhaus, Dec 09 2009

Crossrefs

Cf. A035522 (trajectory of 1 in base 2), A058042 (trajectory of 22 in base 2, written in base 2), A075253 (trajectory of 77 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), A075153 (trajectory of 318 in base 4).
Cf. A171470 (a(4*n)/2), A171471 (a(4*n+1)), A171472 (a(4*n+2)/12), A171473 (a(4*n+3)/3).

Programs

  • ARIBAS
    m := 22; stop := 36; c := 0; while c < stop do write(m,","); k := bit_length(m); rev := 0; for i := 0 to k-1 do if bit_test(m,i) then rev := bit_set(rev,k-1-i); end; end; inc(c); m := m+rev; end;.
    
  • Haskell
    a061561 n = a061561_list !! n
    a061561_list = iterate a055944 22  -- 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(22, 35, 2); // Klaus Brockhaus, Dec 09 2009
    
  • Mathematica
    binRA[n_] := If[Reverse[IntegerDigits[n, 2]] == IntegerDigits[n, 2], n, FromDigits[Reverse[IntegerDigits[n, 2]], 2] + n]; NestList[binRA, 22, 100] (* Adapted from Ben Branman's code for A213012, Alonso del Arte, Jun 02 2012 *)
  • PARI
    {m=22; stop=36; c=0; while(c0,d=divrem(k,2); k=d[1]; rev=2*rev+d[2]); c++; m=m+rev)}
    

Formula

a(0) = 22; a(1) = 35; for n > 1 and n = 2 (mod 4): a(n) = 6*2^(2*k)-3*2^k where k = (n+6)/4; n = 3 (mod 4): a(n) = 6*2^(2*k)+3*2^k-3 where k = (n+5)/4; n = 0 (mod 4): a(n) = 12*2^(2*k)-3*2^k where k = (n+4)/4; n = 1 (mod 4): a(n) = 12*2^(2*k)+9*2^k-3 where k = (n+3)/4. [Klaus Brockhaus, Sep 05 2002]
G.f.: (22+35*x+18*x^2-72*x^4-90*x^5-48*x^6-60*x^7+80*x^8+112*x^9) / ((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4)). [Klaus Brockhaus, Sep 05 2002, edited Dec 09 2009]
a(n+1) = A055944(a(n)). - Reinhard Zumkeller, Apr 21 2013

Extensions

More terms from Klaus Brockhaus, May 27 2001

A066057 'Reverse and Add' carried out in base 2 (cf. A062128); number of steps needed to reach a palindrome, or -1 if no palindrome is ever reached.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, 1, 4, 5, 0, -1, 2, 1, 4, -1, 0, -1, 2, 1, 0, 1, 0, 1, -1, 1, -1, 1, 2, 1, -1, 1, 2, 3, 0, -1, -1, 1, -1, 3, 0, 1, 2, 3, 2, 1, 2, 3, 2, -1, -1, 1, 0, 1, 0, 1, -1, 1, 2, 1, 4, 3, 0, 11, -1, 5, -1, -1, 2, 1, 2, 1, 4, -1, 0, -1, 2, 5, -1, -1, 2, 3, 0, -1, -1, 1, -1, 3, 0, 1, 4, 1, 10, 11, -1, -1, 0, -1, 2, -1, 4
Offset: 0

Views

Author

Klaus Brockhaus, Dec 04 2001

Keywords

Comments

The analog of A033665 in base 2.

Examples

			10011 (19 in base 10) -> 10011 + 11001 = 101100 -> 101100 + 1101 = 111001 -> 111001 + 100111 = 1100000 -> 1100000 + 11 = 1100011 (palindrome) requires 4 steps, so a(19) = 4.
		

Crossrefs

Programs

  • ARIBAS
    function b2reverse(a: integer): integer; var n,i,rev: integer; begin n := bit_length(a); for i := 0 to n-1 do if bit_test(a,i) = 1 then rev := bit_set(rev,n-1-i); end; end; return rev; end; function a066057(mx,stop: integer); var c,k,m,rev: integer; begin for k := 0 to mx do c := 0; m := k; rev := b2reverse(m); while m <> rev and c < stop do inc(c); m := m + rev; rev := b2reverse(m); end; if c < stop then write(c); else write(-1); end; write(" "); end; end; a066057(120,300);
  • Mathematica
    limit = 10^4; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
    Table[np = n; i = 0;
     While[np != IntegerReverse[np, 2] && i < limit,
      np = np + IntegerReverse[np, 2]; i++];
    If[i >= limit, -1, i], {n, 0, 111}] (* Robert Price, Oct 14 2019 *)

A075252 Trajectory of n under the Reverse and Add! operation carried out in base 2 does not reach a palindrome and (presumably) does not join the trajectory of any term m < n.

Original entry on oeis.org

22, 77, 442, 537, 775, 1066, 1081, 1082, 1085, 1115, 1562, 1575, 1587, 2173, 3355, 3599, 3871, 4099, 4153, 4185, 4193, 4202, 4262, 4285, 4402, 4633, 4666, 6163, 6166, 6374, 9241, 9466, 16544, 16546, 16586, 16601, 16613, 16616, 16720, 16748, 16994
Offset: 1

Views

Author

Klaus Brockhaus, Sep 10 2002

Keywords

Comments

Base-2 analog of A063048 (base 10) and A075421 (base 4); subsequence of A066059. - For the trajectory of 22 (cf. A061561) and the trajectory of 77 (cf. A075253) it has been proved that they do not contain a palindrome. A similar proof can be given for most terms of this sequence, but there are a few terms (4262, 17498, 33378, 33898, ...) whose trajectory does not show the kind of regularity that can be utilized for the construction of a proof. - If the trajectory of an integer k joins the trajectory of a smaller integer which is a term of the present sequence, then this occurs after very few 'Reverse and Add!' steps (at most 84 for numbers < 20000). On the other hand, the trajectories of the terms of this sequence do not join the trajectory of any smaller term within at least 1000 steps.
From A.H.M. Smeets, Feb 12 2019: (Start)
Most terms in this sequence eventually give rise to a regular binary pattern. These regular patterns can be represented by contextfree grammars:
S_a -> 10 T_a 00, T_a -> 1 T_a 0 | A_a(n);
S_b -> 11 T_b 01, T_b -> 0 T_b 1 | B_a(n);
S_c -> 10 T_c 000, T_c -> 1 T_c 0 | C_a(n) and
S_d -> 11 T_d 101, T_d -> 0 T_d 1 | D_a(n).
A_22 = 1101, B_22 = 1000, C_22 = 1101, D_22 = 0010 (see also A058042);
A_77 = 1100010, B_77 = 0000101, C_77 = 1101011, D_77 = 0100000 (see also A075253)
Decimal representations for 10 A_a(n) 00 are given by A306514(n).
Binary representations for 10 A_a(n) 00 are given by A306515(n).
(End)

Examples

			442 is a term since the trajectory of 442 (presumably) does not lead to an integer which occurs in the trajectory of 22 or of 77.
		

Crossrefs

Programs

  • Mathematica
    limit = 10^2; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
    utraj = {};
    Select[Range[0, 17000], (x = NestWhileList[# + IntegerReverse[#, 2] &, #, # != IntegerReverse[#, 2] & , 1, limit];
       If[Length[x] >= limit  && Intersection[x, utraj] == {},
        utraj = Union[utraj, x]; True,
    utraj = Union[utraj, x]]) &] (* Robert Price, Oct 16 2019 *)

A066059 Integers such that the 'Reverse and Add!' algorithm in base 2 (cf. A062128) does not lead to a palindrome.

Original entry on oeis.org

22, 26, 28, 35, 37, 41, 46, 47, 49, 60, 61, 67, 75, 77, 78, 84, 86, 89, 90, 94, 95, 97, 105, 106, 108, 110, 116, 120, 122, 124, 125, 131, 135, 139, 141, 147, 149, 152, 155, 157, 158, 163, 164, 166, 169, 172, 174, 177, 180, 182, 185, 186, 190, 191, 193, 197, 199
Offset: 1

Views

Author

Klaus Brockhaus, Dec 04 2001

Keywords

Comments

The analog of A023108 in base 2.
It seems that for all these numbers it can be proven that they never reach a palindrome. For this it is sufficient to prove this for all seeds as given in A075252. As observed, for all numbers in A075252, lim_{n -> inf} t(n+1)/t(n) is 1 or 2 (1 for even n, 2 for odd n or reverse); i.e., lim_{n -> inf} t(n+2)/t(n) = 2, t(n) being the n-th term of the trajectory. - A.H.M. Smeets, Feb 10 2019

Crossrefs

Programs

  • ARIBAS
    : For function b2reverse see A066057; function a066059(mx,stop: integer); var k,c,m,rev: integer; begin for k := 1 to mx do c := 0; m := k; rev := b2reverse(m); while m <> rev and c < stop do inc(c); m := m + rev; rev := b2reverse(m); end; if c >= stop then write(k," "); end; end; end; a066059(210,300).
  • Mathematica
    limit = 10^4; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
    Select[Range[200],
    Length@NestWhileList[# + IntegerReverse[#, 2] &, #, # !=
    IntegerReverse[#, 2]  &, 1, limit] == limit + 1 &] (* Robert Price, Oct 14 2019 *)

A075153 Trajectory of 318 under the Reverse and Add! operation carried out in base 4, written in base 10.

Original entry on oeis.org

318, 1071, 5040, 5985, 10710, 20400, 24225, 43350, 81600, 85425, 165750, 327360, 342705, 664950, 1309440, 1324785, 2629110, 5241600, 5303025, 10524150, 20966400, 21027825, 41973750, 83880960, 84126705, 167925750, 335523840
Offset: 0

Views

Author

Klaus Brockhaus, Sep 05 2002

Keywords

Comments

290 is conjectured (cf. A066450) to be the smallest number such that the Reverse and Add! algorithm in base 4 does not lead to a palindrome. 318 (not 255 since 255 is a base 4 palindrome) is up to now the smallest number 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.
lim_{n -> infinity} a(n)/a(n-1) = 2 for n mod 3 in {1, 2}.
lim_{n -> infinity} a(n)/a(n-1) = 1 for n mod 3 = 0.

Examples

			318 (decimal) = 10332 -> 10332 + 23301 = 100233 = 1071 (decimal).
		

Crossrefs

Cf. A058042 (trajectory of binary number 10110 (decimal 22)), A061561 (A058042 written in base 10), A066450 (conjectured minimal k so that the trajectory of k in base n does not lead to a palindrome).
Cf. A075253 (trajectory of 77 in base 2), A075420 (trajectory of n in base 4 (presumably) does not reach a palindrome), A075421 (trajectory of n in base 4 (presumably) does not reach a palindrome and (presumably) does not join the trajectory of any term m < n), A075299 (trajectory of 290 in base 4), A075466 (trajectory of 266718 in base 4), A075467 (trajectory of 270798 in base 4), A076247 (trajectory of 1059774 in base 4), A076248 (trajectory of 1059831 in base 4), A091675 (trajectory of n in base 4 (presumably) does not join the trajectory of any m < n).
Cf. A166912 (a(6*n)/3), A166913 (a(6*n+1)/3), A166914 (a(6*n+2)/240), A166915 (a(6*n+3)/15), A166916 (a(6*n+4)/30), A166917 (a(6*n+5)/240).

Programs

  • 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(318, 26, 4);
  • Mathematica
    NestWhileList[# + IntegerReverse[#, 4] &, 318,  # !=
    IntegerReverse[#, 4] &, 1, 26] (* Robert Price, Oct 18 2019 *)
  • PARI
    {m=318; stop=29; c=0; while(c0,d=divrem(k,4); k=d[1]; rev=4*rev+d[2]); c++; m=m+rev)}
    

Formula

a(0) = 318; a(1) = 1071; for n > 1 and n = 2 (mod 6): a(n) = 5*4^(2*k+5)-5*4^(k+2) where k = (n-2)/6; n = 3 (mod 6): a(n) = 5*4^(2*k+5)+55*4^(k+2)-15 where k = (n-3)/6; n = 4 (mod 6): a(n) = 10*4^(2*k+5)+30*4^(k+2)-10 where k = (n-4)/6; n = 5 (mod 6): a(n) = 20*4^(2*k+5)-5*4^(k+2) where k = (n-5)/6; n = 0 (mod 6): a(n) = 20*4^(2*k+5)+235*4^(k+2)-15 where k = (n-6)/6; n = 1 (mod 6): a(n) = 40*4^(2*k+5)+150*4^(k+2)-10 where k = (n-7)/6.
G.f.: 3*(106 +357*x +1680*x^2 +1465*x^3 +1785*x^4 -1600*x^5 -1900*x^6 -3400*x^7 -6800*x^8 -9780*x^9 -9860*x^10 +6720*x^11 +10064*x^12 +11088*x^13) / ((1-x)*(1+x+x^2)*(1-2*x^3)*(1+2*x^3)*(1-4*x^3)).

Extensions

Two comments added, g.f. edited, MAGMA program and cross-references added by Klaus Brockhaus, Oct 26 2009

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

Original entry on oeis.org

77, 166, 267, 684, 897, 1416, 1557, 2904, 3333, 5904, 6189, 11952, 12813, 24096, 24669, 48480, 50205, 97344, 98493, 195264, 198717, 391296, 393597, 783744, 790653, 1569024, 1573629, 3140352, 3154173, 6283776, 6292989, 12572160
Offset: 0

Views

Author

Klaus Brockhaus, Sep 10 2002

Keywords

Comments

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.
lim_{n -> infinity} a(n)/a(n-1) = 2 for n mod 2 = 1.
lim_{n -> infinity} a(n)/a(n-1) = 1 for n mod 2 = 0.
Interleaving of A176632, 2*A176633, 3*A176634, 12*A176635.
From A.H.M. Smeets, Feb 11 2019: (Start)
Pattern with cycle length 4 in binary representation, represented by contextfree grammars with production rules:
S_a -> 10 T_a 00, T_a -> 1 T_a 0 | 1100010;
S_b -> 11 T_b 01, T_b -> 0 T_b 1 | 0000101;
S_c -> 10 T_c 000, T_c -> 1 T_c 0 | 1101011;
S_d -> 11 T_d 101, T_d -> 0 T_d 1 | 0100000;
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)

Examples

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

Crossrefs

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).
Cf. A176632 (a(4*n)), A176633 (a(4*n+1)/2), A176634 (a(4*n+2)/3), A176635 (a(4*n+3)/12).

Programs

  • Haskell
    a075253 n = a075253_list !! n
    a075253_list = iterate a055944 77  -- Reinhard Zumkeller, Apr 21 2013
    
  • 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);
    
  • Maple
    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
  • Mathematica
    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 *)
    NestWhileList[# + IntegerReverse[#, 2] &, 77,  # !=
    IntegerReverse[#, 2] &, 1, 31] (* Robert Price, Oct 18 2019 *)
  • PARI
    {m=77; stop=34; c=0; while(c0,d=divrem(k,2); k=d[1]; rev=2*rev+d[2]); c++; m=m+rev)}
    
  • 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

Formula

a(0) = 77; a(1) = 166; a(2) = 267; for n > 2 and
n = 3 (mod 4): a(n) = 48*2^(2*k)-21*2^k where k = (n+5)/4;
n = 0 (mod 4): a(n) = 48*2^(2*k)+33*2^k-3 where k = (n+4)/4;
n = 1 (mod 4): a(n) = 96*2^(2*k)-30*2^k where k = (n+3)/4;
n = 2 (mod 4): a(n) = 96*2^(2*k)+6*2^k-3 where k = (n+2)/4.
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)).
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)).
a(n+1) = A055944(a(n)). - Reinhard Zumkeller, Apr 21 2013

Extensions

Three comments added, g.f. edited, MAGMA program and crossrefs added by Klaus Brockhaus, Apr 25 2010

A075268 Trajectory of 442 under the Reverse and Add! operation carried out in base 2.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Sep 11 2002

Keywords

Comments

22, 77 and 442 are the first terms of A075252. The base 2 trajectory of 442 is completely different from the trajectories of 22 (cf. A061561) and 77 (cf. A075253). Using the formula given below one can prove that it does not contain a palindrome.
lim_{n -> infinity} a(n)/a(n-1) = 2 for n mod 2 = 1.
lim_{n -> infinity} a(n)/a(n-1) = 1 for n mod 2 = 0.
Interleaving of 2*A177420, A177421, 6*A177422, 3*A177423.

Examples

			442 (decimal) = 110111010 -> 110111010 + 010111011 = 1001110101 = 629 (decimal).
		

Crossrefs

Cf. A058042 (trajectory of 22 in base 2, written in base 2), A061561 (trajectory of 22 in base 2), A075253 (trajectory of 77 in base 2), A075252 (trajectory of n in base 2 does not reach a palindrome and (presumably) does not join the trajectory of any term m < n).
Cf. A177420 (a(4*n)/2), A177421 (a(4*n+1)), A177422 (a(4*n+2)/6), A177423 (a(4*n+3)/3).

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

A077076 Trajectory of 537 under the Reverse and Add! operation carried out in base 2, written in base 10.

Original entry on oeis.org

537, 1146, 1899, 3618, 4713, 9522, 14427, 28386, 37533, 84966, 138123, 353004, 466209, 738024, 833301, 1525224, 1718853, 3048912, 3239469, 6196176, 6583437, 12389280, 12770397, 24975264, 25749789, 49944384, 50706621, 100282176
Offset: 0

Views

Author

Klaus Brockhaus, Oct 25 2002

Keywords

Comments

The base 2 trajectory of 537 = A075252(4) provably does not contain a palindrome. A proof can be based on the formula given below.
lim_{n -> infinity} a(n)/a(n-1) = 1 for n mod 2 = 1.
lim_{n -> infinity} a(n)/a(n-1) = 2 for n mod 2 = 0.
Interleaving of 3*A177682, 6*A177683, 3*A177684, 6*A177685.

Examples

			537 (decimal) = 1000011001 -> 1000011001 + 1001100001 = 10001111010= 1146 (decimal).
		

Crossrefs

Cf. A058042 (trajectory of 22 in base 2, written in base 2), A061561 (trajectory of 22 in base 2), A075253 (trajectory of 77 in base 2), A075268 (trajectory of 442 in base 2), A077077 (trajectory of 775 in base 2), A075252 (trajectory of n in base 2 does not reach a palindrome and (presumably) does not join the trajectory of any term m < n).
Cf. A177682 (a(4*n)/3), A177683 (a(4*n+1)/6), A177684 (a(4*n+2)/3), A177685 (a(4*n+3)/6).

Programs

  • Haskell
    a077076 n = a077076_list !! n
    a077076_list = iterate a055944 537  -- 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(537, 27, 2);
    
  • Mathematica
    NestWhileList[# + IntegerReverse[#, 2] &, 537,  # !=
    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(537,27);
    

Formula

a(0), ..., a(11) as above; for n > 11 and
n = 0 (mod 4): a(n) = 3*2^(2*k+13)+18249*2^k-3 where k = (n-4)/4;
n = 1 (mod 4): a(n) = 6*2^(2*k+13)-12102*2^k where k = (n-5)/4;
n = 2 (mod 4): a(n) = 6*2^(2*k+13)+11718*2^k-3 where k = (n-6)/4;
n = 3 (mod 4): a(n) = 12*2^(2*k+13)-11910*2^k where k = (n-7)/4.
G.f.: 3*(179+382*x+96*x^2+60*x^3-328*x^4-444*x^5+1170*x^6+2232*x^7 +1166*x^8+5644*x^9+15402*x^10+46922*x^11+39850*x^12-62920*x^13-132612*x^14 -97532*x^15-34148*x^16+83800*x^17+109224*x^18+21856*x^19) / ((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4)).
G.f. for the sequence starting at a(12): 3*x^12*(155403+246008*x-188442*x^2-229616*x^3-260350*x^4-508920*x^5+293388*x^6+492528*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 12 2010

A077077 Trajectory of 775 under the Reverse and Add! operation carried out in base 2, written in base 10.

Original entry on oeis.org

775, 1674, 2325, 5022, 8919, 23976, 26757, 47376, 49581, 96048, 102669, 193056, 197469, 388704, 401949, 779328, 788157, 1563840, 1590333, 3131520, 3149181, 6273408, 6326397, 12554496, 12589821, 25129728, 25235709, 50274816, 50345469
Offset: 0

Views

Author

Klaus Brockhaus, Oct 25 2002

Keywords

Comments

The base 2 trajectory of 775 = A075252(5) provably does not contain a palindrome. A proof can be based on the formula given below.
lim_{n -> infinity} a(n)/a(n-1) = 1 for n mod 2 = 1.
lim_{n -> infinity} a(n)/a(n-1) = 2 for n mod 2 = 0.
Interleaving of A177843, 6*A177844, 3*A177845, 6*A177846.

Examples

			775 (decimal) = 1100000111 -> 1100000111 + 1110000011 = 11010001010 = 1674 (decimal).
		

Crossrefs

Cf. A058042 (trajectory of 22 in base 2, written in base 2), A061561 (trajectory of 22 in base 2), A075253 (trajectory of 77 in base 2), A075268 (trajectory of 442 in base 2), A077076 (trajectory of 537 in base 2), A075252 (trajectory of n in base 2 does not reach a palindrome and (presumably) does not join the trajectory of any term m < n).
Cf. A177843 (a(4*n)), A177844 (a(4*n+1)/6), A177845 (a(4*n+2)/3), A177846 (a(4*n+3)/6).

Programs

  • Haskell
    a077077 n = a077077_list !! n
    a077077_list = iterate a055944 775  -- 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(775, 28, 2);
    
  • Mathematica
    NestWhileList[# + IntegerReverse[#, 2] &, 775,  # !=
    IntegerReverse[#, 2] &, 1, 28] (* 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(775,28);
    

Formula

a(0), ..., a(5) as above; for n > 5 and
n = 2 (mod 4): a(n) = 3*2^(2*k+7)+273*2^k-3 where k = (n+6)/4;
n = 3 (mod 4): a(n) = 6*2^(2*k+7)-222*2^k where k = (n+5)/4;
n = 0 (mod 4): a(n) = 6*2^(2*k+7)+54*2^k-3 where k = (n+4)/4;
n = 1 (mod 4): a(n) = 12*2^(2*k+7)-282*2^k where k = (n+3)/4.
a(n) = -a(n-1)+2*a(n-2)+2*a(n-3)+2*a(n-4)+2*a(n-5)-4*a(n-6)-4*a(n-7)-3 for n > 12; a(0), ..., a(12) as above.
G.f.: (775+1674*x+1944*x^4+8910*x^5+4650*x^6-14508*x^7-19840*x^8-22644*x^9- 1860*x^10+28680*x^11+14328*x^12-2112*x^13) / ((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4)).
G.f. for the sequence starting at a(6): 3*(8919+15792*x-10230*x^2- 15360*x^3-15358*x^4-31696*x^5+16668*x^6+31264*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, three comments and formula added, g.f. edited, PARI program revised, MAGMA program and crossrefs added by Klaus Brockhaus, May 14 2010

A062130 A062128 written in base 10.

Original entry on oeis.org

0, 1, 3, 3, 5, 5, 9, 7, 9, 9, 15, 27, 15, 27, 21, 15, 17, 17, 27, 99, 99, 21, -1, 63, 27, 99, -1, 27, -1, 63, 45, 31, 33, 33, 51, -1, 45, -1, 63, 99, 45, -1, 63, 99, 99, 45, -1, -1, 51, -1, 255, 51, 63, 99, 255, 153, 63, 99, 255, 153, -1, -1, 93, 63, 65, 65, 99, -1, 85, 255, 119, 387, 255, 73, 13299, -1, 387, -1, -1, 219, 85
Offset: 0

Views

Author

Klaus Brockhaus, Jun 06 2001

Keywords

Examples

			23 -> 23 + 29 = 52 -> 52 + 11 = 63, so a(23) = 63.
		

Crossrefs

Programs

  • ARIBAS
    stop := 500; for k := 0 to 80 do c := 0; m := k; rev := bit_reverse(m); while m <> rev and c < stop do inc(c); m := m + rev; rev := bit_reverse(m); end; if c < stop then write(m); else write(-1); end; write(" "); end;.
  • Mathematica
    limit = 10^4; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
    Table[np = n; i = 0;
     While[np != IntegerReverse[np, 2] && i < limit,
      np = np + IntegerReverse[np, 2]; i++];
    If[i >= limit, -1, np], {n, 0, 80}] (* Robert Price, Oct 14 2019 *)
Showing 1-10 of 20 results. Next