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

A136252 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3).

Original entry on oeis.org

1, 3, 5, 9, 13, 21, 29, 45, 61, 93, 125, 189, 253, 381, 509, 765, 1021, 1533, 2045, 3069, 4093, 6141, 8189, 12285, 16381, 24573, 32765, 49149, 65533, 98301, 131069, 196605, 262141, 393213, 524285, 786429, 1048573, 1572861, 2097149, 3145725, 4194301, 6291453, 8388605
Offset: 0

Views

Author

Paul Curtz, Mar 17 2008

Keywords

Comments

For n >= 2, number of n X n arrays with values that are squares of integers, having all 2 X 2 subblocks summing to 4. - R. H. Hardin, Apr 03 2009
Number of moves required in 4-peg Tower of Hanoi solution using a (suboptimal) recursive algorithm: Move (n-2) disks, move bottom 2 disks, move (n-2) disks. Cf. A007664. - Toby Gottfried, Nov 29 2010

Crossrefs

Same recurrence as in A135530.
Partial sums of A163403.
A060482 without the term 2.
Cf. A007664 (Optimal 4-peg Tower of Hanoi).
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Programs

  • Maple
    a:=proc(n) options operator,arrow: 2^((1/2)*n-1)*(4+4*(-1)^n+3*sqrt(2)*(1-(-1)^n))-3 end proc: seq(a(n),n=0..40); # Emeric Deutsch, Mar 31 2008
  • Mathematica
    LinearRecurrence[{1, 2, -2}, {1, 3, 5}, 100] (* G. C. Greubel, Feb 18 2017 *)
  • PARI
    x='x+O('x^50); Vec((1+2*x)/((1-x)*(1-2*x^2))) \\ G. C. Greubel, Feb 18 2017

Formula

a(n) = 2^((1/2)*n-1)*(4 + 4(-1)^n + 3*sqrt(2)*(1-(-1)^n)) - 3. - Emeric Deutsch, Mar 31 2008
G.f.: (1+2*x)/((1-x)*(1-2*x^2)). - Jaume Oliver Lafont, Aug 30 2009
a(n) = 2*a(n-2) + 3; first differences are powers of 2, occurring in pairs. - Toby Gottfried, Nov 29 2010
a(n) = A027383(n+1) - 1. - Jason Kimberley, Nov 01 2011
a(2n+1) = (a(2n) + a(2n+2))/2. - Richard R. Forberg, Nov 30 2013
E.g.f.: 4*cosh(sqrt(2)*x) + 3*sqrt(2)*sinh(sqrt(2)*x) - 3*cosh(x) - 3*sinh(x). - Stefano Spezia, May 13 2023

Extensions

Edited by N. J. A. Sloane, Apr 18 2008
More terms from Emeric Deutsch, Mar 31 2008

A143095 (1, 2, 4, 8, ...) interleaved with (4, 8, 16, 32, ...).

Original entry on oeis.org

1, 4, 2, 8, 4, 16, 8, 32, 16, 64, 32, 128, 64, 256, 128, 512, 256, 1024, 512, 2048, 1024, 4096, 2048, 8192, 4096, 16384, 8192, 32768, 16384, 65536, 32768, 131072, 65536, 262144, 131072, 524288, 262144, 1048576, 524288, 2097152, 1048576, 4194304
Offset: 0

Views

Author

Keywords

Comments

Partial sums are in A079360. a(n) = A076736(n+5). - Klaus Brockhaus, Jul 27 2009

Crossrefs

Cf. A048655.

Programs

  • Maple
    seq(coeff(series((1+4*x)/(1-2*x^2), x, n+1), x, n), n = 0..45); # G. C. Greubel, Mar 13 2020
  • Mathematica
    nn=30;With[{p=2^Range[0,nn]},Riffle[Take[p,nn-2],Drop[p,2]]] (* Harvey P. Dale, Oct 03 2011 *)
  • Maxima
    A143095(n):=(5-3*(-1)^n)*2^(1/4*(2*n-1+(-1)^n))/2$
    makelist(A143095(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
    
  • PARI
    for(n=0, 41, print1((5-3*(-1)^n)*2^(1/4*(2*n-1+(-1)^n))/2, ",")) \\ Klaus Brockhaus, Jul 27 2009
    
  • Sage
    [(5 -3*(-1)^n)*2^((2*n-1+(-1)^n)/4)/2 for n in (0..45)] # G. C. Greubel, Mar 13 2020

Formula

Inverse binomial transform of A048655: (1, 5, 11, 27, 65, 157, ...).
a(n) = A135530(n+1). - R. J. Mathar, Aug 02 2008
From Klaus Brockhaus, Jul 27 2009: (Start)
a(n) = (5 - 3*(-1)^n) * 2^((2*n-1+(-1)^n)/4)/2.
a(n) = 2*a(n-2) for n > 1; a(0) = 1, a(1) = 4.
G.f.: (1+4*x)/(1-2*x^2). (End)
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011

Extensions

More terms from Klaus Brockhaus, Jul 27 2009

A161941 a(n) = ((4+sqrt(2))*(2+sqrt(2))^n + (4-sqrt(2))*(2-sqrt(2))^n)/4.

Original entry on oeis.org

2, 5, 16, 54, 184, 628, 2144, 7320, 24992, 85328, 291328, 994656, 3395968, 11594560, 39586304, 135156096, 461451776, 1575494912, 5379076096, 18365314560, 62703106048, 214081795072, 730920968192, 2495520282624, 8520239194112
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Jun 22 2009

Keywords

Comments

Second binomial transform of A135530.

Crossrefs

Cf. A135530, A161944 (third binomial transform of A135530).

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((4+r)*(2+r)^n+(4-r)*(2-r)^n)/4: n in [0..24] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 01 2009
    
  • Mathematica
    LinearRecurrence[{4,-2},{2,5},30] (* Harvey P. Dale, May 26 2012 *)
  • PARI
    x='x+O('x^30); Vec((2-3*x)/(1-4*x+2*x^2)) \\ G. C. Greubel, Jan 27 2018

Formula

a(n) = 4*a(n-1) - 2*a(n-2) for n>1; a(0) = 2; a(1) = 5.
G.f.: (2-3*x)/(1-4*x+2*x^2).
a(n) = 2*A007070(n) - 3*A007070(n-1). - R. J. Mathar, Oct 20 2017

Extensions

Edited and extended beyond a(4) by Klaus Brockhaus, Jul 01 2009

A147675 Divide by 2, multiply by 4, repeat.

Original entry on oeis.org

10, 5, 20, 10, 40, 20, 80, 40, 160, 80, 320, 160, 640, 320, 1280, 640, 2560, 1280, 5120, 2560, 10240, 5120, 20480, 10240, 40960, 20480, 81920, 40960, 163840, 81920, 327680, 163840, 655360, 327680, 1310720, 655360, 2621440, 1310720, 5242880
Offset: 1

Views

Author

N. J. A. Sloane, Apr 21 2009

Keywords

Comments

A147675-A147678 are from a quiz that someone asked me to help them with.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 2}, {10, 5}, 50] (* Paolo Xausa, Jan 30 2024 *)

Formula

From R. J. Mathar, Apr 22 2009: (Start)
a(n) = 2*a(n-2) = 5*A135530(n-1).
G.f.: 5*x*(2+x)/(1-2*x^2). (End)
From Amiram Eldar, Feb 02 2024: (Start)
Sum_{n>=1} 1/a(n) = 3/5.
Sum_{n>=1} (-1)^n/a(n) = 1/5. (End)

Extensions

More terms from R. J. Mathar, Apr 22 2009

A161944 a(n) = ((4+sqrt(2))*(3+sqrt(2))^n + (4-sqrt(2))*(3-sqrt(2))^n)/4.

Original entry on oeis.org

2, 7, 28, 119, 518, 2275, 10024, 44219, 195146, 861343, 3802036, 16782815, 74082638, 327016123, 1443518272, 6371996771, 28127352722, 124160138935, 548069364556, 2419295214791, 10679285736854, 47140647917587
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Jun 22 2009

Keywords

Comments

Third binomial transform of A135530.

Crossrefs

Cf. A135530, A161941 (second binomial transform of A135530).

Programs

  • GAP
    a:=[2,7];; for n in [3..25] do a[n]:=6*a[n-1]-7*a[n-2]; od; a; # Muniru A Asiru, Apr 04 2018
  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((4+r)*(3+r)^n+(4-r)*(3-r)^n)/4: n in [0..21] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 01 2009
    
  • Mathematica
    LinearRecurrence[{6,-7}, {2,7}, 50] (* G. C. Greubel, Apr 03 2018 *)
    Table[((4+Sqrt[2])(3+Sqrt[2])^n+(4-Sqrt[2])(3-Sqrt[2])^n)/4,{n,0,30}]// Simplify (* Harvey P. Dale, Jun 03 2020 *)
  • PARI
    x='x+O('x^30); Vec((2-5*x)/(1-6*x+7*x^2)) \\ G. C. Greubel, Apr 03 2018
    

Formula

a(n) = 6*a(n-1) - 7*a(n-2) for n > 1; a(0) = 2; a(1) = 7.
G.f.: (2-5*x)/(1-6*x+7*x^2).
E.g.f.: exp(3*x)*(4*cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x))/2. - G. C. Greubel, Apr 03 2018

Extensions

Edited and extended beyond a(4) by Klaus Brockhaus, Jul 01 2009

A135536 a(n) = 8*a(n-2), with a(0) = 7, a(1) = 14.

Original entry on oeis.org

7, 14, 56, 112, 448, 896, 3584, 7168, 28672, 57344, 229376, 458752, 1835008, 3670016, 14680064, 29360128, 117440512, 234881024, 939524096, 1879048192, 7516192768, 15032385536, 60129542144, 120259084288, 481036337152
Offset: 0

Views

Author

Paul Curtz, Feb 22 2008

Keywords

Programs

  • Mathematica
    Table[(7/4)*( (2 + Sqrt[2]) + (-1)^n*(2 - Sqrt[2]) )*(Sqrt[2])^(3*n), {n,0,25}] (* or *) LinearRecurrence[{0,8},{7,14}, 25] (* G. C. Greubel, Oct 18 2016 *)
  • PARI
    a(n)=([0,1; 8,0]^n*[7;14])[1,1] \\ Charles R Greathouse IV, Oct 18 2016

Formula

a(n) = b(3*n) + b(3*n + 1) + b(3*n + 2), where b(n) = A135530(n) [previous name].
a(n) = 7 * abs(A094014(n)).
O.g.f.: 7*(1 + 2*x)/(1 - 8*x^2). - R. J. Mathar, Feb 23 2008
From G. C. Greubel, Oct 18 2016: (Start)
a(n) = (7/4)*( (2 + sqrt(2)) + (-1)^n*(2 - sqrt(2)) )*(sqrt(2))^(3*n).
a(n) = 8*a(n-2).
E.g.f.: (7/2)*( 2*cosh(2*sqrt(2)*x) + sqrt(2)*sinh(2*sqrt(2)*x) ). (End)

Extensions

More terms from R. J. Mathar, Feb 23 2008
New name from G. C. Greubel, Oct 18 2016

A161947 a(n) = ((4+sqrt(2))*(5+sqrt(2))^n + (4-sqrt(2))*(5-sqrt(2))^n)/4.

Original entry on oeis.org

2, 11, 64, 387, 2398, 15079, 95636, 609543, 3895802, 24938531, 159781864, 1024232427, 6567341398, 42116068159, 270111829436, 1732448726703, 11111915190002, 71272831185851, 457154262488464, 2932267507610067, 18808127038865998, 120639117713628439, 773804255242366436
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Jun 22 2009

Keywords

Comments

Fifth binomial transform of A135530.

Crossrefs

Cf. A135530.

Programs

  • GAP
    a := [2, 11];; for n in [3..10^2] do a[n] := 10*a[n-1] - 23*a[n-2]; od; a; # Muniru A Asiru, Feb 02 2018
    
  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((4+r)*(5+r)^n+(4-r)*(5-r)^n)/4: n in [0..19] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 01 2009
    
  • Maple
    seq(simplify(((4+sqrt(2))*(5+sqrt(2))^n+(4-sqrt(2))*(5-sqrt(2))^n)*1/4), n = 0 .. 20); # Emeric Deutsch, Jun 28 2009
  • Mathematica
    LinearRecurrence[{10,-23}, {2,11}, 50] (* G. C. Greubel, Aug 17 2018 *)
    Table[(((4+Sqrt[2])(5+Sqrt[2])^n)+((4-Sqrt[2])(5-Sqrt[2])^n))/4,{n,0,20}]//Simplify (* Harvey P. Dale, Mar 07 2020 *)
  • PARI
    x='x+O('x^30); Vec((2-9*x)/(1-10*x+23*x^2)) \\ G. C. Greubel, Aug 17 2018

Formula

a(n) = 10*a(n-1) - 23*a(n-2) for n>1; a(0) = 2; a(1) = 11.
G.f.: (2-9*x)/(1-10*x+23*x^2).
E.g.f.: exp(5*x)*(4*cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x))/2. - Stefano Spezia, Oct 24 2023

Extensions

Edited and extended beyond a(4) by Klaus Brockhaus, Jul 01 2009
Extended by Emeric Deutsch, Jun 28 2009

A137206 First differences of A074323.

Original entry on oeis.org

0, 2, -1, 4, -2, 8, -4, 16, -8, 32, -16, 64, -32, 128, -64, 256, -128, 512, -256, 1024, -512, 2048, -1024, 4096, -2048, 8192, -4096, 16384, -8192, 32768, -16384, 65536, -32768, 131072, -65536, 262144, -131072, 524288, -262144, 1048576, -524288
Offset: 0

Views

Author

Paul Curtz, Mar 05 2008

Keywords

Crossrefs

Formula

From R. J. Mathar, Apr 22 2009: (Start)
G.f.: x*(2-x)/(1-2*x^2).
a(n) = (-1)^(n+1)*A135530(n-1). (End)
a(n) = 2*a(n-2). - Matthew House, Jan 15 2017

Extensions

More terms from R. J. Mathar, Apr 22 2009

A140407 A000225 interleaved with A000051.

Original entry on oeis.org

1, 2, 3, 3, 7, 5, 15, 9, 31, 17, 63, 33, 127, 65, 255, 129, 511, 257, 1023, 513, 2047, 1025, 4095, 2049, 8191, 4097, 16383, 8193, 32767, 16385, 65535, 32769, 131071, 65537, 262143, 131073, 524287, 262145, 1048575, 524289, 2097151, 1048577, 4194303
Offset: 0

Views

Author

Paul Curtz, Jun 16 2008

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{-1,2,2},{1,2,3},50] (* Harvey P. Dale, Apr 03 2013 *)
  • Python
    def A140407(n): return 2 if n == 1 else (1<<(n>>1))|1 if n&1 else -1^(-2<<(n>>1)) # Chai Wah Wu, Dec 21 2022

Formula

a(2n) = A000225(n+1) = A135530(2n) - 1. a(2n+1) = A000051(n) = 1 + A135530(2n+1).
a(n) = -a(n-1) + 2*a(n-2) + 2*a(n-3). a(2n) + a(2n+1) = 3*A000079(n).
O.g.f.: (1 + 3x + 3x^2)/((1+x)*(1-2x^2)). - R. J. Mathar, Jul 08 2008

Extensions

Edited and extended by R. J. Mathar, Jul 08 2008

A162356 a(n) = 8*a(n-1)-14*a(n-2) for n>1; a(0) = 2; a(1) = 9.

Original entry on oeis.org

2, 9, 44, 226, 1192, 6372, 34288, 185096, 1000736, 5414544, 29306048, 158644768, 858873472, 4649961024, 25175459584, 136304222336, 737977344512, 3995559643392, 21632794323968, 117124519584256, 634137036138496
Offset: 0

Views

Author

Klaus Brockhaus, Jul 01 2009

Keywords

Comments

Fourth binomial transform of A135530.

Crossrefs

Cf. A135530, A161944 (third binomial transform of A135530), A161947 (fifth binomial transform of A135530).

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((4+r)^(n+1)+(4-r)^(n+1))/4: n in [0..20] ]; [ Integers()!S[j]: j in [1..#S] ];

Formula

G.f.: (2-7*x)/(1-8*x+14*x^2).
a(n) = ((4+sqrt(2))^(n+1)+(4-sqrt(2))^(n+1))/4.
Showing 1-10 of 11 results. Next