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.

A101675 Expansion of (1 - x - x^2)/(1 + x^2 + x^4).

Original entry on oeis.org

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

Views

Author

Paul Barry, Dec 11 2004

Keywords

Comments

Partial sums are A101676.
Periodic with period 6. - Ray Chandler, Sep 03 2015

Crossrefs

Cf. A101676.

Programs

  • Magma
    I:=[1,-1,-2,1]; [n le 4 select I[n] else -Self(n-2)-Self(n-4): n in [1..120]]; // Vincenzo Librandi, Sep 04 2015
  • Mathematica
    LinearRecurrence[{0, -1, 0, -1},{1, -1, -2, 1},105] (* Ray Chandler, Sep 03 2015 *)
    CoefficientList[Series[(1 - x - x^2)/(1 + x^2 + x^4), {x, 0, 150}], x] (* Vincenzo Librandi, Sep 04 2015 *)
  • PARI
    Vec((1-x-x^2)/(1+x^2+x^4) + O(x^80)) \\ Michel Marcus, Sep 04 2015
    

Formula

a(0) = 1, a(1) = -1, a(2) = -2, a(3) = 1; for n >= 4, a(n) = -a(n-2)-a(n-4).
a(n) = Sum_{k=0..floor(n/2)} (-1)^A010060(n-2k)*(binomial(n-k, k) mod 2)*(-1)^k.
a(n) = cos(2*Pi*n/3 + Pi/6)/sqrt(3) + sin(2*Pi*n/3 + Pi/6) + cos(Pi*n/3 + Pi/3) - sin(Pi*n/3 + Pi/3)/sqrt(3).
a(n) = (-1)^(n+1)*H(n + 4, n mod 2, 1/2) where H(n, a, b) = hypergeom([a - n/2, b - n/2], [1 - n], 4). - Peter Luschny, Sep 03 2019

A101677 a(n) = a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - a(n-6).

Original entry on oeis.org

1, 1, -1, -2, -2, -2, -1, -1, -3, -4, -4, -4, -3, -3, -5, -6, -6, -6, -5, -5, -7, -8, -8, -8, -7, -7, -9, -10, -10, -10, -9, -9, -11, -12, -12, -12, -11, -11, -13, -14, -14, -14, -13, -13, -15, -16, -16, -16, -15, -15, -17, -18, -18, -18, -17, -17, -19, -20, -20, -20, -19, -19, -21, -22, -22, -22, -21, -21, -23, -24, -24, -24, -23, -23, -25, -26, -26, -26, -25, -25, -27
Offset: 0

Views

Author

Paul Barry, Dec 11 2004

Keywords

Comments

Partial sums of A101676, second partial sums of A101675.

Programs

  • Magma
    m:=100; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x-x^2)/((1-x)^2*(1+x^2+x^4)))); // G. C. Greubel, Sep 07 2018
  • Mathematica
    LinearRecurrence[{2, -2, 2, -2, 2, -1},{1, 1, -1, -2, -2, -2},81] (* Ray Chandler, Sep 03 2015 *)
    CoefficientList[Series[(1-x-x^2)/((1-x)^2(1+x^2+x^4)),{x,0,80}],x] (* Harvey P. Dale, Dec 02 2021 *)
  • PARI
    x='x+O('x^100); Vec((1-x-x^2)/((1-x)^2*(1+x^2+x^4))) \\ G. C. Greubel, Sep 07 2018
    

Formula

G.f.: (1-x-x^2)/((1-x)^2*(1+x^2+x^4)).
a(n) = 2*sqrt(3)*sin(2*Pi*n/3)/9 + cos(Pi*n/3) + sin(Pi*n/3)/sqrt(3) - n/3.
a(3*(n+1)) = -A014681(n+1); a(3*n) = a(3*n+1) = 0^n -A014681(n); a(3*n+2) = -(n+1).
Showing 1-2 of 2 results.