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 11 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

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

A171476 a(n) = 6*a(n-1) - 8*a(n-2) for n > 1, a(0)=1, a(1)=6.

Original entry on oeis.org

1, 6, 28, 120, 496, 2016, 8128, 32640, 130816, 523776, 2096128, 8386560, 33550336, 134209536, 536854528, 2147450880, 8589869056, 34359607296, 137438691328, 549755289600, 2199022206976, 8796090925056, 35184367894528
Offset: 0

Views

Author

Klaus Brockhaus, Dec 09 2009

Keywords

Comments

Binomial transform of A048473; second binomial transform of A151821; third binomial transform of A010684; fourth binomial transform of A084633 without second term 0; fifth binomial transform of A168589.
Inverse binomial transform of A081625; second inverse binomial transform of A081626; third inverse binomial transform of A081627.
Partial sums of A010036.
Essentially first differences of A006095.
a(n) = A109241(n) converted from binary to decimal. - Robert Price, Jan 19 2016
a(n) is the area enclosed by a Hilbert curve with unit length segments after n iterations, when the start and end points are joined. - Jennifer Buckley, Apr 23 2024

Crossrefs

Cf. A006516 (2^(n-1)*(2^n-1)), A020522 (4^n-2^n), A048473 (2*3^n-1), A151821 (powers of 2, omitting 2 itself), A010684 (repeat 1, 3), A084633 (inverse binomial transform of repeated odd numbers), A168589 ((2-3^n)*(-1)^n), A081625 (2*5^n-3^n), A081626 (2*6^n-4^n), A081627 (2*7^n-5^n), A010036 (sum of 2^n, ..., 2^(n+1)-1), A006095 (Gaussian binomial coefficient [n, 2] for q=2), A171472, A171473.

Programs

  • Magma
    [2*4^n-2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
  • Mathematica
    LinearRecurrence[{6,-8},{1,6},30] (* Harvey P. Dale, Aug 02 2020 *)
  • PARI
    m=23; v=concat([1, 6], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]); v
    

Formula

a(n) = Sum_{k=1..2^n-1} k.
a(n) = 2*4^n - 2^n.
G.f.: 1/((1-2*x)*(1-4*x)).
a(n) = A006516(n+1).
a(n) = 4*a(n-1) + 2^n for n > 0, a(0)=1. - Vincenzo Librandi, Jul 17 2011
a(n) = Sum_{k=0..n} 2^(n+k). - Bruno Berselli, Aug 07 2013
a(n) = A020522(n+1)/2. - Hussam al-Homsi, Jun 06 2021
E.g.f.: exp(2*x)*(2*exp(2*x) - 1). - Stefano Spezia, Dec 10 2021

A171499 a(n) = 6*a(n-1) - 8*a(n-2) for n > 1; a(0) = 3, a(1) = 14.

Original entry on oeis.org

3, 14, 60, 248, 1008, 4064, 16320, 65408, 261888, 1048064, 4193280, 16775168, 67104768, 268427264, 1073725440, 4294934528, 17179803648, 68719345664, 274877644800, 1099511103488, 4398045462528, 17592183947264, 70368739983360
Offset: 0

Views

Author

Klaus Brockhaus, Dec 10 2009

Keywords

Comments

Binomial transform of A171498; second binomial transform of A171497; third binomial transform of A010703.
Related to sequences A001969 and A000069, sum of each group with exponent 1. - Eric Desbiaux, Jul 24 2013
a(n) in base 2 is n+2 1s followed by n 0s. - Hussam al-Homsi, Oct 12 2021

Crossrefs

Programs

  • Magma
    [4*4^n-2^n: n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
    
  • Mathematica
    (* This program shows how A171499 arises from the Vandermonde determinant of (1,2,4,...,2^(n-1)). *)
    f[j_]:= 2^j - 1; z = 15;
    v[n_]:= Product[Product[f[k] - f[j], {j,k-1}], {k,2,n}]
    d[n_]:= Product[(i-1)!, {i,n}]
    Table[v[n], {n,z}]                     (* A203303 *)
    Table[v[n+1]/v[n], {n,z}]              (* A002884 *)
    Table[v[n]*v[n+2]/(2*v[n+1])^2, {n,z}]  (* A171499 *)
    (* Clark Kimberling, Jan 02 2011 *)
    LinearRecurrence[{6,-8},{3,14},30] (* Harvey P. Dale, Sep 05 2021 *)
  • PARI
    {m=23; v=concat([3, 14], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]); v}
    
  • SageMath
    [4^(n+1) -2^n for n in range(31)] # G. C. Greubel, Aug 31 2023

Formula

a(n) = 4*4^n - 2^n = 2^n * (2^(n+2) - 1).
G.f.: (3-4*x)/((1-2*x)*(1-4*x)).
a(n) = 4*a(n-1) + 2^n for n > 0. - Vincenzo Librandi, Jul 18 2011
a(n) = A171476(n+1)/2. - Hussam al-Homsi, Jun 06 2021
E.g.f.: 4*exp(4*x) - exp(2*x). - G. C. Greubel, Aug 31 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)).

A171471 a(n) = 6*a(n-1)-8*a(n-2)-9 for n > 2; a(0) = 35, a(1) = 225, a(2) = 837.

Original entry on oeis.org

35, 225, 837, 3213, 12573, 49725, 197757, 788733, 3150333, 12592125, 50350077, 201363453, 805380093, 3221372925, 12885196797, 51540197373, 206159609853, 824636080125, 3298539601917, 13194148970493, 52776577007613
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+1) = a(n).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{7,-14,8},{35,225,837,3213},30] (* Harvey P. Dale, Mar 22 2018 *)
  • PARI
    {m=22; v=concat([35, 225, 837], vector(m-3)); for(n=4, m, v[n]=6*v[n-1]-8*v[n-2]-9); v}

Formula

a(n) = 48*4^n+18*2^n-3 for n > 0.
G.f.: (35-20*x-248*x^2+224*x^3)/((1-x)*(1-2*x)*(1-4*x)).

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

Original entry on oeis.org

1, 7, 35, 155, 651, 2667, 10795, 43435, 174251, 698027, 2794155, 11180715, 44731051, 178940587, 715795115, 2863245995, 11453115051, 45812722347, 183251413675, 733006703275, 2932028910251, 11728119835307, 46912487729835
Offset: 0

Views

Author

Klaus Brockhaus, Dec 09 2009

Keywords

Comments

a(n) = A006095(n+2).
Second binomial transform of A168642.
Essentially partial sums of A006516.

Crossrefs

Cf. A006095 (Gaussian binomial coefficient [n, 2] for q=2), A168642 ((8*2^n+(-1)^n)/3, a(0)=1), A006516 (2^(n-1)*(2^n-1)), A171472, A171473.

Programs

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

Formula

a(n) = (8*4^n-6*2^n+1)/3.
G.f.: 1/((1-x)*(1-2*x)*(1-4*x)).
a(n) = A139250(2^(n+1) - 1). - Omar E. Pol, Dec 20 2012

A171496 a(n) = 6*a(n-1) - 8*a(n-2) for n > 1; a(0) = 6, a(1) = 28.

Original entry on oeis.org

6, 28, 120, 496, 2016, 8128, 32640, 130816, 523776, 2096128, 8386560, 33550336, 134209536, 536854528, 2147450880, 8589869056, 34359607296, 137438691328, 549755289600, 2199022206976, 8796090925056, 35184367894528
Offset: 0

Views

Author

Klaus Brockhaus, Dec 10 2009

Keywords

Comments

Binomial transform of A171495; second binomial transform of A171494; third binomial transform of A010726.

Crossrefs

Programs

  • Magma
    [8*4^n-2*2^n: n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
  • Mathematica
    LinearRecurrence[{6,-8},{6,28},30] (* Harvey P. Dale, Dec 21 2014 *)
  • PARI
    {m=22; v=concat([6, 28], 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*2^n.
G.f.: 2*(3-4*x)/((1-2*x)*(1-4*x)).
a(n) = A171476(n+1) = A006516(n+2).
a(n+1) - a(n) = A010036(n+2).
a(n) = 4*a(n-1)+2^(n+1) (with a(0)=6). - Vincenzo Librandi, Dec 04 2010
E.g.f.: 2*exp(2*x)*(2*exp(2*x) - 1)*(2*exp(2*x) + 1). - Stefano Spezia, Dec 10 2021

A171478 a(n) = 6*a(n-1) - 8*a(n-2) + 2 for n > 1; a(0) = 1, a(1) = 8.

Original entry on oeis.org

1, 8, 42, 190, 806, 3318, 13462, 54230, 217686, 872278, 3492182, 13974870, 55911766, 223671638, 894735702, 3579041110, 14316361046, 57265837398, 229064136022, 916258116950, 3665035613526, 14660148745558, 58640607565142
Offset: 0

Views

Author

Klaus Brockhaus, Dec 09 2009

Keywords

Comments

Second binomial transform of A168648.
Partial sums of A080960.

Crossrefs

Cf. A168648 ((10*2^n+2*(-1)^n)/3, a(0)=1), A080960 (third binomial transform of A010685), A171472, A171473.

Programs

  • GAP
    a:=[1,8];; for n in [3..25] do a[n]:=6*a[n-1]-8*a[n-2]+2; od; a; # Muniru A Asiru, Mar 22 2018
  • Magma
    [(10*4^n-9*2^n+2)/3: n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
    
  • Maple
    a:= proc(n) option remember: if n = 0 then 1 elif n = 1 then 8 elif  n >= 2 then 6*procname(n-1) - 8*procname(n-2) + 2 fi; end:
    seq(a(n), n = 0..25); # Muniru A Asiru, Mar 22 2018
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==8,a[n]==6a[n-1]-8a[n-2]+2},a,{n,30}] (* or *) LinearRecurrence[{7,-14,8},{1,8,42},30] (* Harvey P. Dale, May 04 2012 *)
  • PARI
    {m=23; v=concat([1, 8], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]+2); v}
    

Formula

a(n) = (10*4^n - 9*2^n + 2)/3.
G.f.: (1+x)/((1-x)*(1-2*x)*(1-4*x)).
a(0)=1, a(1)=8, a(2)=42, a(n) = 7*a(n-1) - 14*a(n-2) + 8*a(n-3). - Harvey P. Dale, May 04 2012
a(n) = A203241(n+1) + 2^n*(2^(n+1)-1), n>0. - J. M. Bergot, Mar 21 2018

A171479 a(n) = 6*a(n-1)-8*a(n-2)+3 for n > 1; a(0) = 1, a(1) = 8.

Original entry on oeis.org

1, 8, 43, 197, 841, 3473, 14113, 56897, 228481, 915713, 3666433, 14672897, 58705921, 234852353, 939466753, 3757981697, 15032156161, 60129083393, 240517251073, 962070839297, 3848287027201, 15393155448833, 61572636475393
Offset: 0

Views

Author

Klaus Brockhaus, Dec 09 2009

Keywords

Crossrefs

Programs

  • Magma
    [(2-7*2^n+7*4^n)/2: n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
  • Maple
    A171479:=n->(2-7*2^n+7*4^n)/2: seq(A171479(n), n=0..30); # Wesley Ivan Hurt, Apr 28 2017
  • Mathematica
    LinearRecurrence[{7,-14,8},{1,8,43},30] (* Harvey P. Dale, Sep 18 2022 *)
  • PARI
    {m=23; v=concat([1, 8], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]+3); v}
    

Formula

a(n) = (2-7*2^n+7*4^n)/2.
G.f.: (1+x+x^2)/((1-x)*(1-2*x)*(1-4*x)).
E.g.f.: exp(x)*(2 - 7*exp(x) + 7*exp(3*x))/2. - Stefano Spezia, Feb 23 2025
Showing 1-10 of 11 results. Next