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

A130772 Periodic sequence with period 2 2 0 -2 -2 0.

Original entry on oeis.org

2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2
Offset: 0

Views

Author

Paul Curtz, Jul 14 2007

Keywords

Comments

Sequence is identical to its third differences.

Examples

			G.f. = 2 + 2*x - 2*x^3 - 2*x^4 + 2*x^6 + 2*x^7 - 2*x^9 - 2*x^10 + ...
		

Crossrefs

Programs

  • Magma
    I:=[2,2]; [n le 2 select I[n] else Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Aug 04 2018
  • Mathematica
    PadRight[{},120,{2,2,0,-2,-2,0}] (* or *) LinearRecurrence[{1,-1},{2,2},120] (* Harvey P. Dale, Jan 13 2014 *)
  • PARI
    for(i=1,9,print1("2, 2, 0, -2, -2, 0, ")) \\ Charles R Greathouse IV, Jun 02 2011
    

Formula

O.g.f.: 2/(x^2-x+1). a(n) = 2*A010892(n) . - R. J. Mathar, Feb 14 2008
a(0)=2, a(1)=2, a(n)=a(n-1)-a(n-2). - Harvey P. Dale, Jan 13 2014
a(n) = A184334(n+1) if n>=0. a(n) = A109265(n-1) = A257076(n) if n>1. - Michael Somos, Sep 01 2015

A184334 Period 6 sequence [0, 2, 2, 0, -2, -2, ...] except a(0) = 1.

Original entry on oeis.org

1, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0
Offset: 0

Views

Author

Michael Somos, Feb 13 2011

Keywords

Examples

			G.f. = 1 + 2*x + 2*x^2 - 2*x^4 - 2*x^5 + 2*x^7 + 2*x^8 - 2*x^10 - 2*x^11 + ...
		

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 + x+x^2)/(1-x+x^2))); // G. C. Greubel, Aug 04 2018
  • Mathematica
    PadRight[{1},120,{0,2,2,0,-2,-2}] (* Harvey P. Dale, Apr 02 2015 *)
    a[ n_] := Boole[n == 0] + {2, 2, 0, -2, -2, 0}[[Mod[n, 6, 1]]]; (* Michael Somos, Sep 01 2015 *)
  • PARI
    {a(n) = (n==0) + [ 0, 2, 2, 0, -2, -2][n%6+1]};
    
  • PARI
    {a(n) = (n==0) + 2 * (-1)^(n\3) * sign( n%3)};
    

Formula

a(n) = 2 * b(n) where b() is multiplicative with b(2^e) = (-1)^(e-1) if e>0, b(3^e) = 0^e, b(p^e) = 1 if p == 1 mod 6, b(p^e) = (-1)^e if p == 5 mod 6.
Euler transform of length 6 sequence [2, -1, -2, 0, 0, 1].
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = 2 * u * (v - 1) - (u - 1)^2 * v.
G.f.: (1 + x + x^2) / (1 - x + x^2).
a(-n) = -a(n) unless n = 0. a(n+3) = -a(n) unless n = 0 or n = -3.
G.f.: 1 / (1 - 2*x / (1 + x / (1 - x / (1 + x)))). - Michael Somos, Jan 03 2013
a(n) = A130772(n-1) if n>0.
a(n) = A257076(n-1) = A109265(n-2) if n>2. - Michael Somos, Sep 01 2015

A110309 Expansion of (1+3*x+x^2)/((1+x+x^2)*(1+5*x+x^2)).

Original entry on oeis.org

1, -3, 12, -57, 275, -1320, 6325, -30303, 145188, -695637, 3332999, -15969360, 76513801, -366599643, 1756484412, -8415822417, 40322627675, -193197315960, 925663952125, -4435122444663, 21249948271188, -101814618911277, 487823146285199, -2337301112514720
Offset: 0

Views

Author

Creighton Dement, Jul 19 2005

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+3*x+x^2)/((1+x+x^2)*(1+5*x+x^2)) )); // G. C. Greubel, Jan 03 2023
    
  • Maple
    seriestolist(series((1+3*x+x^2)/((x^2+5*x+1)*(x^2+x+1)), x=0,25));
  • Mathematica
    LinearRecurrence[{-6,-7,-6,-1}, {1,-3,12,-57}, 40] (* G. C. Greubel, Jan 03 2023 *)
  • PARI
    Vec((1+3*x+x^2)/((1+x+x^2)*(1+5*x+x^2)) + O(x^25)) \\ Colin Barker, Apr 30 2019
    
  • SageMath
    def A110309(n): return (1/2)*(chebyshev_U(n,-5/2)+chebyshev_U(n,-1/2))
    [A110309(n) for n in range(41)] # G. C. Greubel, Jan 03 2023

Formula

a(n+2) = - 5*a(n+1) - a(n) + (-1)^n*A109265(n+3).
a(n) = -6*a(n-1) - 7*a(n-2) - 6*a(n-3) - a(n-4) for n>3. - Colin Barker, Apr 30 2019
a(n) = (1/2)*(ChebyshevU(n, -5/2) + ChebyshevU(n, -1/2)). - G. C. Greubel, Jan 03 2023

A110310 Expansion of (1-x+x^2)/((x^2+x+1)*(x^2+5*x+1)).

Original entry on oeis.org

1, -7, 36, -173, 827, -3960, 18973, -90907, 435564, -2086913, 9998999, -47908080, 229541401, -1099798927, 5269453236, -25247467253, 120967883027, -579591947880, 2776991856373, -13305367333987, 63749844813564, -305443856733833, 1463469438855599, -7011903337544160
Offset: 0

Views

Author

Creighton Dement, Jul 19 2005

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x+x^2)/((1+x+x^2)*(1+5*x+x^2)) )); // G. C. Greubel, Jan 02 2023
    
  • Maple
    seriestolist(series((1-x+x^2)/((x^2+x+1)*(x^2+5*x+1)), x=0,25));
  • Mathematica
    LinearRecurrence[{-6,-7,-6,-1}, {1,-7,36,-173}, 40] (* G. C. Greubel, Jan 02 2023 *)
  • PARI
    Vec((1-x+x^2)/((1+x+x^2)*(1+5*x+x^2)) + O(x^25)) \\ Colin Barker, Apr 30 2019
    
  • SageMath
    def U(n,x): return chebyshev_U(n,x)
    def A110310(n): return (1/2)*(3*U(n, -5/2) - U(n, -1/2))
    [A110310(n) for n in range(41)] # G. C. Greubel, Jan 02 2023

Formula

a(n+2) = - 5*a(n+1) - a(n) - (-1)^n*A109265(n+3).
a(n) = -6*a(n-1) - 7*a(n-2) - 6*a(n-3) - a(n-4) for n>3. - Colin Barker, Apr 30 2019
a(n) = (1/2)*(3*ChevyshevU(n, -5/2) - ChebyshevU(n, -1/2)). - G. C. Greubel, Jan 02 2023

A110311 Expansion of 1/((1+x+x^2)*(1+5*x+x^2)).

Original entry on oeis.org

1, -6, 29, -138, 660, -3162, 15151, -72594, 347819, -1666500, 7984680, -38256900, 183299821, -878242206, 4207911209, -20161313838, 96598657980, -462831976062, 2217561222331, -10624974135594, 50907309455639, -243911573142600, 1168650556257360, -5599341208144200
Offset: 0

Views

Author

Creighton Dement, Jul 19 2005

Keywords

Comments

In reference to the program code, A004254(n+1) = 1ibaseiseq[A*B](n).
Superseeker finds: a(n) + a(n+1) + a(n+2) = (-1)^n*A004254(n+3).

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1/((1+x+x^2)*(1+5*x+x^2)) )); // G. C. Greubel, Jan 02 2023
    
  • Maple
    seriestolist(series(1/((x^2+5*x+1)*(x^2+x+1)), x=0,25));
  • Mathematica
    LinearRecurrence[{-6,-7,-6,-1}, {1,-6,29,-138}, 40] (* G. C. Greubel, Jan 02 2023 *)
  • PARI
    Vec(1/((1+x+x^2)*(1+5*x+x^2)) + O(x^25)) \\ Colin Barker, May 14 2019
    
  • SageMath
    def U(n,x): return chebyshev_U(n,x)
    def A110311(n): return (1/4)*(5*U(n, -5/2) + U(n-1, -5/2) - U(n, -1/2) - U(n-1, -1/2))
    [A110311(n) for n in range(41)] # G. C. Greubel, Jan 02 2023

Formula

a(n+2) = - 5*a(n+1) - a(n) + ((-1)^n)*A109265(n+1)/2.
a(n) = -6*a(n-1) - 7*a(n-2) - 6*a(n-3) - a(n-4) for n>3. - Colin Barker, May 14 2019
a(n) = (1/4)*(5*U(n, -5/2) + U(n-1, -5/2) - U(n, -1/2) - U(n-1, -1/2)), where U(n, x) = ChebyshevU(n, x). - G. C. Greubel, Jan 02 2023

A257076 Expansion of (1 - x^3) / (1 - x + x^2) in powers of x.

Original entry on oeis.org

1, 1, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0
Offset: 0

Views

Author

Michael Somos, Apr 15 2015

Keywords

Examples

			G.f. = 1 + x - 2*x^3 - 2*x^4 + 2*x^6 + 2*x^7 - 2*x^9 - 2*x^10 + 2*x^12 + ...
		

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x^3)/(1-x+x^2))); // G. C. Greubel, Aug 03 2018
  • Mathematica
    a[ n_] := SeriesCoefficient[ (1 - x^3) / (1 - x + x^2), {x, 0, n}];
    Join[{1, 1},LinearRecurrence[{1, -1},{0, -2},76]] (* Ray Chandler, Aug 10 2015 *)
  • PARI
    {a(n) = n++; if( n<3, n>0, 2 * (n%3>0) * (-1)^(n\3))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 - x^3) / (1 - x + x^2) + x * O(x^n), n))};
    

Formula

Euler transform of length 6 sequence [ 1, -1, -2, 0, 0, 1].
G.f.: (1 - x^2) * (1 - x^3)^2 / ((1 - x) * (1 - x^6)).
a(n) = -a(n+3) if n>1.
a(n) = A109265(n-1) if n>0.
Convolution inverse of A257075.
a(n) = A130772(n) for n>1. - R. J. Mathar, Apr 19 2015
a(n) = A184334(n+1) if n>1. - Michael Somos, Sep 01 2015

A109264 Riordan array (1-x-x^2,x(1-x)).

Original entry on oeis.org

1, -1, 1, -1, -2, 1, 0, 0, -3, 1, 0, 1, 2, -4, 1, 0, 0, 1, 5, -5, 1, 0, 0, -1, -1, 9, -6, 1, 0, 0, 0, -2, -6, 14, -7, 1, 0, 0, 0, 1, -1, -15, 20, -8, 1, 0, 0, 0, 0, 3, 5, -29, 27, -9, 1, 0, 0, 0, 0, -1, 4, 20, -49, 35, -10, 1, 0, 0, 0, 0, 0, -4, -1, 49, -76, 44, -11, 1, 0, 0, 0, 0, 0, 1, -8, -21, 98, -111, 54, -12, 1
Offset: 0

Views

Author

Paul Barry, Jun 24 2005

Keywords

Comments

Rows sums are A109265. Diagonal sums are A109266. Inverse is A109267.

Examples

			Rows begin
1;
-1,1;
-1,-2,1;
0,0,-3,1;
0,1,2,-4,1;
0,0,1,5,-5,1;
0,0,-1,-1,9,-6,1;
		
Showing 1-7 of 7 results.