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

A077953 Expansion of 1/(1-x+2*x^2-2*x^3).

Original entry on oeis.org

1, 1, -1, -1, 3, 3, -5, -5, 11, 11, -21, -21, 43, 43, -85, -85, 171, 171, -341, -341, 683, 683, -1365, -1365, 2731, 2731, -5461, -5461, 10923, 10923, -21845, -21845, 43691, 43691, -87381, -87381, 174763, 174763, -349525, -349525, 699051, 699051, -1398101, -1398101, 2796203, 2796203, -5592405
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002, Jun 17 2007

Keywords

Comments

Essentially the same as A077980.

Crossrefs

Cf. A077980.
Cf. A007420, A077925. - Reinhard Zumkeller, Oct 07 2008

Programs

  • GAP
    a:=[1,1,-1];; for n in [4..50] do a[n]:=a[n-1]-2*a[n-2]+2*a[n-3]; od; a; # G. C. Greubel, Aug 07 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1-x+2*x^2-2*x^3) )); // G. C. Greubel, Aug 07 2019
    
  • Maple
    seq(coeff(series(1/(1-x+2*x^2-2*x^3), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Aug 07 2019
  • Mathematica
    CoefficientList[Series[1/(1-x+2x^2-2x^3),{x,0,50}],x] (* or *) LinearRecurrence[{1,-2,2},{1,1,-1},50] (* Harvey P. Dale, Aug 27 2014 *)
  • PARI
    Vec(1/(1-x+2*x^2-2*x^3)+O(x^50)) \\ Charles R Greathouse IV, Sep 25 2012
    
  • Sage
    (1/(1-x+2*x^2-2*x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Aug 07 2019
    

Formula

From Reinhard Zumkeller, Oct 07 2008: (Start)
a(n+1) = a(n) - 2*a(n-1) + 2*a(n-2).
a(n) = A077925(floor(n/2)-1) for n>1. (End)

A373358 a(n) = 4*a(n-1) -5*a(n-2) +2*a(n-3) +2*a(n-4) for a(0) = a(1) = 0, a(2) = 1, a(3) = 4 for n >= 4.

Original entry on oeis.org

0, 0, 1, 4, 11, 26, 59, 136, 323, 782, 1903, 4620, 11175, 26970, 65051, 156944, 378811, 914566, 2208199, 5331476, 12871663, 31074802, 75020243, 181113240, 437244675, 1055602590, 2548453951, 6152518684, 14853499511, 35859517706, 86572518539, 209004522016, 504581529803, 1218167581622
Offset: 0

Views

Author

Paul Curtz, Jun 02 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4, -5, 2, 2}, {0, 0, 1, 4}, 50] (* Paolo Xausa, Jun 19 2024 *)
    nxt[{a_,b_,c_,d_}]:={b,c,d,4d-5c+2b+2a}; NestList[nxt,{0,0,1,4},40][[;;,1]] (* Harvey P. Dale, Jan 11 2025 *)
  • PARI
    a(n) = ((([2, 1; 1, 0]^(n+1))[2, 1]) - (1+I)^(n-1) - (1-I)^(n-1))/3 \\ Thomas Scheuerle, Jun 03 2024

Formula

G.f.: x^2 / ( (1 - 2*x - x^2) * (1 - 2*x + 2*x^2) ).
E.g.f.: exp(x)*(2*cosh(sqrt(2)*x) - 2*(cos(x)+sin(x)) + sqrt(2)*sinh(sqrt(2)*x))/6.
a(n) = A373245(n+1) - A114203(n+1).
a(0) = 0, a(n) = A373245(n-1) + A146559(n-1).
Binomial transform of 0, 0, followed by A077893 = abs(A077953) = abs(A077980).
a(n) = 4*a(n-1) -5*a(n-2) +2*a(n-3) +2*a(n-4) for n >= 4.
From Thomas Scheuerle, Jun 03 2024: (Start)
a(n) = (A000129(n+1) - A009545(n+1))/3.
a(n) = (-i*sqrt(2)*(1-i)^(n+1) + i*sqrt(2)*(1+i)^(n+1) - (1-sqrt(2))^(n+1) + (1+sqrt(2))^(n+1))/(6*sqrt(2)).
a(n) = 2^n*(hypergeom([1/2 - n/2, -n/2], [-n], -1) - hypergeom([1/2 - n/2, -n/2], [-n], 2))/3. (End)

A078052 Expansion of (1-x)/(1+x+2*x^2+2*x^3).

Original entry on oeis.org

1, -2, 0, 2, 2, -6, -2, 10, 6, -22, -10, 42, 22, -86, -42, 170, 86, -342, -170, 682, 342, -1366, -682, 2730, 1366, -5462, -2730, 10922, 5462, -21846, -10922, 43690, 21846, -87382, -43690, 174762, 87382, -349526, -174762, 699050, 349526, -1398102, -699050, 2796202, 1398102, -5592406, -2796202
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

First differences of A077980.

Programs

  • Magma
    I:=[1,-2,0]; [n le 3 select I[n] else -Self(n-1)-2*Self(n-2) -2*Self(n-3): n in [1..50]]; // Vincenzo Librandi, Aug 17 2013
  • Mathematica
    CoefficientList[Series[(1 - x) / (1 + x + 2 x^2 + 2 x^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 17 2013 *)
    LinearRecurrence[{-1,-2,-2},{1,-2,0},50] (* Harvey P. Dale, Mar 26 2015 *)
  • PARI
    a(n)=1/3*((-3+5*(-1)^n)/2*(-2)^floor(n/2)+2*(-1)^n); \\ Ralf Stephan, Aug 17 2013
    

Formula

a(n) = (1/3) * ((-3+5*(-1)^n)/2 * (-2)^floor(n/2) + 2*(-1)^n ). - Ralf Stephan, Aug 17 2013
a(0)=1, a(1)=-2, a(2)=0, a(n)=-a(n-1)-2*a(n-2)-2*a(n-3). - Harvey P. Dale, Mar 26 2015
Showing 1-3 of 3 results.