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

A135530 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3), with a(0)=2, a(1)=1.

Original entry on oeis.org

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
Offset: 0

Views

Author

Paul Curtz, Feb 20 2008

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(-x-2)/(2x^2-1),{x,0,40}],x]
    Transpose[NestList[{#[[2]],Last[#],Last[#]+2#[[2]]-2First[#]}&,{2,1,4},45]][[1]]  (* Harvey P. Dale, Mar 05 2011 *)
    LinearRecurrence[{0, 2}, {2, 1}, 25] (* G. C. Greubel, Oct 17 2016 *)
  • PARI
    a(n)=1<<(1-n%2+n\2) \\ Charles R Greathouse IV, Jun 01 2011

Formula

From R. J. Mathar, Feb 23 2008: (Start)
O.g.f.: -(2+x)/(2*x^2-1).
a(n) = 2*a(n-2).
a(n) = A077957(n+1) + A077957(n+2). (End)
E.g.f.: (1/sqrt(2))*( 2*sqrt(2)*cosh(sqrt(2)*x) + sinh(sqrt(2)*x) ). - G. C. Greubel, Oct 17 2016
a(n) = A076736(n+4) for n >= 0. - Georg Fischer, Nov 03 2018
From Amiram Eldar, Feb 02 2024: (Start)
Sum_{n>=0} 1/a(n) = 3.
Sum_{n>=0} (-1)^(n+1)/a(n) = 1. (End)

Extensions

More terms from R. J. Mathar, Feb 23 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

A076737 Let u(1)=u(2)=u(3)=2, u(n)=(1+u(n-1)u(n-2))/u(n-3); then a(n) is the numerator of u(n).

Original entry on oeis.org

2, 2, 2, 5, 3, 17, 11, 65, 43, 257, 171, 1025, 683, 4097, 2731, 16385, 10923, 65537, 43691, 262145, 174763, 1048577, 699051, 4194305, 2796203, 16777217, 11184811, 67108865, 44739243, 268435457, 178956971, 1073741825, 715827883, 4294967297
Offset: 1

Views

Author

Benoit Cloitre, Nov 24 2002

Keywords

Crossrefs

Cf. A005246, A076736 (denominator of u(n)).

Programs

  • Maple
    2,2,2,seq(2/3+(1/6)*2^k+(1/12)*(-1)^k*2^k+(1/3)*(-1)^k,k=4..50); # Robert Israel, Aug 10 2015
    H := (n, a, b) -> hypergeom([a - n/2, b - n/2], [1 - n], -8):
    a := n -> `if`(n < 5, [2, 2, 2, 5][n], H(n-2, irem(n, 2), 1/2)):
    seq(simplify(a(n)), n=1..34); # Peter Luschny, Sep 03 2019
  • Mathematica
    nxt[{a_,b_,c_}]:={b,c,(1+b c)/a}; NestList[nxt,{2,2,2},40][[All,1]]// Numerator (* Harvey P. Dale, Oct 31 2021 *)

Formula

For n>4, a(n) = 2^A028242(n-4)*u(n); u(2n) = 2^(n-1)+1/2^n hence a(2n) = 4^(n-1)+1.
From Michael Somos (via Benoit Cloitre), Nov 29 2002: (Start)
a(1)=a(2)=a(3)=2, a(n+2) = (1+2^n)/(1+2*(n mod 2)).
For k>=2, a(2k+1) = A001045(2k-1). (End)
Empirical g.f.: x*(4*x^6+x^4-5*x^3-8*x^2+2*x+2) / ((x-1)*(x+1)*(2*x-1)*(2*x+1)). - Colin Barker, Oct 14 2014
This follows from the Somos formula for a(n+2). - Robert Israel, Aug 10 2015
a(1)=a(2)=a(3)=2 and, for n>3, a(n) = denominator(1/2+6/(4+2^n)). - Gerry Martens, Aug 10 2015
a(n) = H(n - 2, n mod 2, 1/2) for n >= 5 where H(n, a, b) -> hypergeom([a - n/2, b - n/2], [1 - n], -8). - Peter Luschny, Sep 03 2019

A094361 Pair-reversal of 1,4,4,16,16...

Original entry on oeis.org

4, 1, 16, 4, 64, 16, 256, 64, 1024, 256, 4096, 1024, 16384, 4096, 65536, 16384, 262144, 65536, 1048576, 262144, 4194304, 1048576, 16777216, 4194304, 67108864, 16777216, 268435456, 67108864, 1073741824, 268435456, 4294967296, 1073741824
Offset: 0

Views

Author

Paul Barry, Apr 26 2004

Keywords

Crossrefs

Cf. A076736.

Programs

  • Mathematica
    LinearRecurrence[{0,4},{4,1},50] (* Harvey P. Dale, Apr 15 2017 *)

Formula

a(n) = k^(n/2)(1+k*sqrt(k)-(1-ksqrt(k))(-1)^n)/(2*sqrt(k)), the pair reversal of 1,k,k,k^2,k^2,k^3,k^3,... for k=4.
G.f.: (4+x)/(1-4*x^2).
a(n) = (9*2^n+7*(-2)^n)/4.
Recurrence: a(n) = 4a(n-2), a(0)=4, a(1)=1. - Ralf Stephan, Jul 17 2013
Showing 1-4 of 4 results.