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-5 of 5 results.

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

A171472 a(n) = 6*a(n-1) - 8*a(n-2) for n > 1; a(0) = 7, a(1) = 30.

Original entry on oeis.org

7, 30, 124, 504, 2032, 8160, 32704, 130944, 524032, 2096640, 8387584, 33552384, 134213632, 536862720, 2147467264, 8589901824, 34359672832, 137438822400, 549755551744, 2199022731264, 8796091973632, 35184369991680
Offset: 0

Views

Author

Klaus Brockhaus, Dec 09 2009

Keywords

Comments

Related to Reverse and Add trajectory of 22 in base 2: A061561(4*n+2) = 12*a(n).
Third binomial transform of A010729.
a(n) in base 2 is n+3 1s followed by n 0s. - Hussam al-Homsi, Oct 12 2021

Crossrefs

Cf. A061561, A010729 (repeat 7, 9), A171470, A171471, A171473, A171499.

Programs

  • Magma
    [8*4^n-2^n: n in [0..30]]; // Vincenzo Librandi, May 31 2011
  • Mathematica
    LinearRecurrence[{6,-8},{7,30},30] (* Harvey P. Dale, Sep 01 2016 *)
  • PARI
    {m=22; v=concat([7, 30], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]); v}
    

Formula

a(n) = 8*4^n-2^n.
G.f.: (7-12*x)/((1-2*x)*(1-4*x)).
a(n) = A171499(n+1)/2. - Hussam al-Homsi, Jun 06 2021
E.g.f.: exp(2*x)*(8*exp(2*x) - 1). - Stefano Spezia, Sep 27 2023

A171473 a(n) = 6*a(n-1) - 8*a(n-2)-3 for n > 1; a(0) = 35, a(1) = 135.

Original entry on oeis.org

35, 135, 527, 2079, 8255, 32895, 131327, 524799, 2098175, 8390655, 33558527, 134225919, 536887295, 2147516415, 8590000127, 34359869439, 137439215615, 549756338175, 2199024304127, 8796095119359, 35184376283135
Offset: 0

Views

Author

Klaus Brockhaus, Dec 09 2009

Keywords

Comments

Related to Reverse and Add trajectory of 22 in base 2: A061561(4*n+3) = 3*a(n).

Crossrefs

Programs

  • Magma
    [32*4^n+4*2^n-1: n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
  • PARI
    {m=20; v=concat([35, 135], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]-3); v}
    

Formula

a(n) = 32*4^n + 4*2^n - 1.
G.f.: (35-110*x+72*x^2)/((1-x)*(1-2*x)*(1-4*x)).
a(n) = A092431(n+3).
a(n+1) - a(n) = A049775(n+5).
E.g.f.: exp(x)*(32*exp(3*x) + 4*exp(x) - 1). - Stefano Spezia, Sep 27 2023

A171470 a(n) = 6*a(n-1) - 8*a(n-2) for n > 2; a(0) = 11, a(1) = 90, a(2) = 372.

Original entry on oeis.org

11, 90, 372, 1512, 6096, 24480, 98112, 392832, 1572096, 6289920, 25162752, 100657152, 402640896, 1610588160, 6442401792, 25769705472, 103079018496, 412316467200, 1649266655232, 6597068193792, 26388275920896
Offset: 0

Views

Author

Klaus Brockhaus, Dec 09 2009

Keywords

Comments

Related to Reverse and Add trajectory of 22 in base 2: A061561(4*n) = 2*a(n).
Binary representation of a(n) for n > 0 is given by the following production rules of the contextfree grammar: S -> 101 T 0, T -> 1 T 0 | 101. - A.H.M. Smeets, Feb 11 2019

Crossrefs

Programs

  • PARI
    {m=21; v=concat([11, 90, 372], vector(m-3)); for(n=4, m, v[n]=6*v[n-1]-8*v[n-2]); v}

Formula

a(n) = 24*4^n-3*2^n for n > 0.
G.f.: (1+4*x)*(11-20*x)/((1-2*x)*(1-4*x)).

A176632 a(n) = 6*a(n-1)-8*a(n-2)-9 for n > 2; a(0) = 77, a(1) = 897, a(2) = 3333.

Original entry on oeis.org

77, 897, 3333, 12813, 50205, 198717, 790653, 3154173, 12599805, 50365437, 201394173, 805441533, 3221495805, 12885442557, 51540688893, 206160592893, 824638046205, 3298543534077, 13194156834813, 52776592736253
Offset: 0

Views

Author

Klaus Brockhaus, Apr 22 2010

Keywords

Comments

Related to Reverse and Add trajectory of 77 in base 2: a(n) = A075253(4*n), i.e., first quadrisection of A075253.

Crossrefs

Cf. A075253 (Reverse and Add trajectory of 77 in base 2), A176633, A176634, A176635, A171471.

Programs

  • Magma
    [77] cat [3*(64*4^n+22*2^n-1): n in [1..25]]; // Vincenzo Librandi, Sep 24 2013
  • Mathematica
    CoefficientList[Series[(77 + 358 x - 1868 x^2 + 1424 x^3)/((1 - x) (1 - 2 x) (1 - 4 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 24 2013 *)
    Join[{77},RecurrenceTable[{a[1]==897,a[2]==3333,a[n]==6a[n-1]-8a[n-2]- 9},a[n],{n,20}]] (* Harvey P. Dale, May 21 2019 *)
  • PARI
    {m=20; v=concat([77, 897, 3333], vector(m-3)); for(n=4, m, v[n]=6*v[n-1]-8*v[n-2]-9); v}
    

Formula

a(n) = 3*(64*4^n+22*2^n-1) for n > 0, a(0) = 77.
G.f.: (77+358*x-1868*x^2+1424*x^3)/((1-x)*(1-2*x)*(1-4*x)).
G.f. for the sequence starting at a(1): 3*x*(299-982*x+680*x^2)/((1-x)* (1-2*x)*(1-4*x)).
Showing 1-5 of 5 results.