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.

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

Original entry on oeis.org

-1, 1, 1, 3, 9, 25, 71, 201, 569, 1611, 4561, 12913, 36559, 103505, 293041, 829651, 2348889, 6650121, 18827671, 53304473, 150914409, 427265435, 1209664161, 3424773601, 9696140959, 27451493281, 77720042081, 220039211683, 622970000809, 1763738467065
Offset: 0

Views

Author

Michael Somos, Dec 16 2013

Keywords

Examples

			G.f. = -1 + x + x^2 + 3*x^3 + 9*x^4 + 25*x^5 + 71*x^6 + 201*x^7 + 569*x^8 + ...
		

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((-1+3*x+x^2)/(1-2*x-2*x^2-x^3))); // G. C. Greubel, Aug 07 2018
  • Mathematica
    CoefficientList[Series[(-1+3*x+x^2)/(1-2*x-2*x^2-x^3), {x, 0, 50}], x] (* G. C. Greubel, Aug 07 2018 *)
  • PARI
    {a(n) = if( n<0, polcoeff( (-1 -x + x^2) / (1 + 2*x + 2*x^2 - x^3) + x * O(x^-n), -n), polcoeff( (-1 + 3*x + x^2) / (1 - 2*x - 2*x^2 - x^3) + x * O(x^n), n))}
    

Formula

G.f.: (-1 + 3*x + x^2) / (1 - 2*x - 2*x^2 - x^3).
a(n+2) = A101168(n). a(-n) = A233831(n).
a(n) - a(n-1) = -2 * (-1)^n * A078054(n-3).
a(n)^2 - a(n-1) * a(n+1) = -2 * (-1)^n * A078004(n-1).

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

Original entry on oeis.org

1, -2, 6, -17, 48, -136, 385, -1090, 3086, -8737, 24736, -70032, 198273, -561346, 1589270, -4499505, 12738896, -36066072, 102109441, -289089922, 818464798, -2317218881, 6560457280, -18573817120, 52585767681, -148879626882, 421504606246, -1193354233937, 3378597307248
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Cf. A078054 (first differences), A077936.

Programs

  • GAP
    a:=[1,-2,6];; for n in [4..30] do a[n]:=-2*a[n-1]+2*a[n-2]-a[n-3]; od; a; # G. C. Greubel, Jun 25 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 1/(1+2*x-2*x^2+x^3) )); // G. C. Greubel, Jun 25 2019
    
  • Mathematica
    LinearRecurrence[{-2,2,-1}, {1,-2,6}, 30] (* or *) CoefficientList[ Series[1/(1+2*x-2*x^2+x^3), {x,0,30}], x] (* G. C. Greubel, Jun 25 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec(1/(1+2*x-2*x^2+x^3)) \\ G. C. Greubel, Jun 25 2019
    
  • Sage
    (1/(1+2*x-2*x^2+x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 25 2019
    

Formula

a(n) = (-1)^n * A077936(n). - Ivan Neretin, Jul 05 2015
a(n) = -2*a(n-1) + 2*a(n-2) - a(n-3) with a(0) = 1, a(1) = -2, a(2) = 6. - Taras Goy, Aug 04 2017

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

Original entry on oeis.org

-1, 1, 1, -5, 9, -7, -9, 41, -71, 51, 81, -335, 559, -367, -719, 2731, -4391, 2601, 6311, -22215, 34409, -18077, -54879, 180321, -268961, 122401, 473441, -1460645, 2096809, -798887, -4056489, 11807561, -16301031, 4930451, 34548721, -95259375, 126351759
Offset: 0

Views

Author

Michael Somos, Dec 16 2013

Keywords

Examples

			G.f. = -1 + x + x^2 - 5*x^3 + 9*x^4 - 7*x^5 - 9*x^6 + 41*x^7 - 71*x^8 + ...
		

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((-1-x+x^2)/(1+2*x+2*x^2-x^3))); // G. C. Greubel, Aug 07 2018
  • Mathematica
    CoefficientList[Series[(-1-x+x^2)/(1+2*x+2*x^2-x^3), {x, 0, 50}], x] (* G. C. Greubel, Aug 07 2018 *)
    LinearRecurrence[{-2,-2,1},{-1,1,1},40] (* Harvey P. Dale, Nov 28 2024 *)
  • PARI
    {a(n) = if( n<0, polcoeff( (-1 +3*x + x^2) / (1 - 2*x - 2*x^2 - x^3) + x * O(x^-n), -n), polcoeff( (-1 - x + x^2) / (1 + 2*x + 2*x^2 - x^3) + x * O(x^n), n))}
    

Formula

G.f.: (-1 - x + x^2) / (1 + 2*x + 2*x^2 - x^3).
a(-n) = A233828(n).
a(n) - a(n-1) = -2 * (-1)^n * A078004(n).
a(n)^2 - a(n-1) * a(n+1) = -2 * (-1)^n * A078054(n-1).
Showing 1-3 of 3 results.