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

A109265 Row sums of Riordan array (1-x-x^2,x(1-x)).

Original entry on oeis.org

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

Views

Author

Paul Barry, Jun 24 2005

Keywords

Examples

			G.f. = 1 - 2*x^2 - 2*x^3 + 2*x^5 + 2*x^6 - 2*x^8 - 2*x^9 + 2*x^11 + 2*x^12 + ...
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x-x^2)/(1-x+x^2))); // G. C. Greubel, Aug 04 2018
  • Mathematica
    CoefficientList[Series[(1-x-x^2)/(1-x+x^2), {x, 0, 60}], x] (* G. C. Greubel, Aug 04 2018 *)
    LinearRecurrence[{1,-1},{1,0,-2},120] (* Harvey P. Dale, Apr 08 2019 *)
  • PARI
    {a(n) = n+=2; if( n<3, n==2, 2 * (n%3>0) * (-1)^(n\3))}; /* Michael Somos, Apr 15 2015 */
    

Formula

G.f.: (1-x-x^2)/(1-x+x^2).
a(n) = -a(n+3) if n>0. - Michael Somos, Apr 15 2015
a(n) = A257076(n+1). - Michael Somos, Apr 15 2015
Convolution inverse of A006355. - Michael Somos, Apr 15 2015
a(n) = A130772(n+1) = A184334(n+2) if n>0. - Michael Somos, Sep 01 2015

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

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

A185331 Riordan array ((1-x+x^2)/(1+x^2), x/(1+x^2)).

Original entry on oeis.org

1, -1, 1, 0, -1, 1, 1, -1, -1, 1, 0, 2, -2, -1, 1, -1, 1, 3, -3, -1, 1, 0, -3, 3, 4, -4, -1, 1, 1, -1, -6, 6, 5, -5, -1, 1, 0, 4, -4, -10, 10, 6, -6, -1, 1, -1, 1, 10, -10, -15, 15, 7, -7, -1, 1, 0, -5, 5, 20, -20, -21, 21, 8, -8, -1, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 08 2012

Keywords

Comments

Triangle T(n,k), read by rows, given by (-1, 1, -1, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Examples

			Triangle begins:
   1;
  -1,  1;
   0, -1,   1;
   1, -1,  -1,   1;
   0,  2,  -2,  -1,   1;
  -1,  1,   3,  -3,  -1,   1;
   0, -3,   3,   4,  -4,  -1,   1;
   1, -1,  -6,   6,   5,  -5,  -1,  1;
   0,  4,  -4, -10,  10,   6,  -6, -1,  1;
  -1,  1,  10, -10, -15,  15,   7, -7, -1,  1;
   0, -5,   5,  20, -20, -21,  21,  8, -8, -1,  1;
   1, -1, -15,  15,  35, -35, -28, 28,  9, -9, -1, 1;
		

Crossrefs

Cf. A206474 (unsigned version).

Programs

  • Mathematica
    CoefficientList[Series[CoefficientList[Series[(1 - x + x^2)/(1 - y*x + x^2), {x, 0, 10}], x], {y, 0, 10}], y] // Flatten (* G. C. Greubel, Jun 27 2017 *)

Formula

T(n,k) = T(n-1,k-1) - T(n-2,k), T(0,0) = 1, T(0,1) = -1, T(0,2) = 0.
G.f.: (1-x+x^2)/(1-y*x+x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = (-1)^n*A184334(n), A163805(n), A000007(n), A028310(n), A025169(n-1), A005320(n) (n>0) for x = -1, 0, 1, 2, 3, 4 respectively.
T(n,n) = 1, T(n+1,n) = -1, T(n+2,n) = -n, T(n+3,n) = n+1, T(n+4,n) = n(n+1)/2 = A000217(n).
T(2n,2k) = (-1)^(n-k) * A128908(n,k), T(2n+1,2k+1) = -T(2n+1,2k) = A129818(n,k), T(2n+2,2k+1) = (-1)*A053122(n,k). - Philippe Deléham, Feb 09 2012

A305029 Period 10 sequence [ 0, 2, 2, 2, 2, 0, -2, -2, -2, -2, ...] except a(0) = 1.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, May 24 2018

Keywords

Comments

If m is odd, (Sum_{k=0..m} x^k)/(Sum_{k=0..m} (-x)^k) = (1+x)/(1-x).

Crossrefs

Cf. A040000 (m is odd), A000007 (m=0), A184334 (m=2), this sequence (m=4).

Programs

  • PARI
    N=66; x='x+O('x^N); Vec(((sum(k=0, 4, x^k))/(sum(k=0, 4, (-x)^k))))

Formula

G.f.: (1 + x + x^2 + x^3 + x^4)/(1 - x + x^2 - x^3 + x^4).
Showing 1-5 of 5 results.