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

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

Original entry on oeis.org

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

Views

Author

Paul Barry, Mar 10 2006

Keywords

Comments

Row sums of number triangle A117372.
Periodic sequence with period {1, -2, -3, -1, 2, 3}. - Philippe Deléham, Nov 03 2008

Crossrefs

Cf. A010872 (n mod 3), A010875 (n mod 6).

Programs

Formula

G.f.: (1 - 3x)/(1 - x + x^2).
a(n) = Sum_{k=0..n} (-1)^(n-k)*(C(k,n-k) + 3*C(k, n-k-1)).
a(n) = a(n-1) - a(n-2); a(0)=1, a(1)=-2. - Philippe Deléham, Nov 03 2008
a(n) = A010892(n) - 3*A010892(n-1). - R. J. Mathar, Sep 14 2013
a(n) = cos(n*Pi/3) - 5*sin(n*Pi/3)/sqrt(3). - Andres Cicuttin, Apr 06 2016
a(n) = ((n mod 3)^2 - 4*(n mod 3) + 1)*(-1)^floor(n/3). - Luce ETIENNE, Nov 18 2017

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

Original entry on oeis.org

1, -3, 1, -4, 4, -5, 8, -9, 13, -17, 22, -30, 39, -52, 69, -91, 121, -160, 212, -281, 372, -493, 653, -865, 1146, -1518, 2011, -2664, 3529, -4675, 6193, -8204, 10868, -14397, 19072, -25265, 33469
Offset: 0

Views

Author

Paul Barry, Mar 10 2006

Keywords

Comments

Diagonal sums of number triangle A117372.

Programs

  • Mathematica
    CoefficientList[Series[(1-3x)/(1-x^2+x^3),{x,0,40}],x] (* or *) LinearRecurrence[{0,1,-1},{1,-3,1},40] (* Harvey P. Dale, May 06 2022 *)

Formula

a(n)=a(n-2)+a(n-3); a(n)=sum{k=0..floor(n/2), (-1)^n*(C(k,n-2k)+3*C(k, n-2k-1))}.
Showing 1-2 of 2 results.