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.

A101676 a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) with initial terms 1,0,-2,-1,0.

Original entry on oeis.org

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

Views

Author

Paul Barry, Dec 11 2004

Keywords

Comments

Partial sums of A101675. Partial sums are A101677.
Sequence has period 6. - Ralf Stephan, May 16 2007

Programs

  • Magma
    I:=[1, 0, -2, -1, 0]; [n le 5 select I[n] else Self(n-1) - Self(n-2) +Self(n-3) -Self(n-4) +Self(n-5): n in [1..100]]; // G. C. Greubel, Sep 07 2018
  • Mathematica
    LinearRecurrence[{1, -1, 1, -1, 1},{1, 0, -2, -1, 0},105] (* Ray Chandler, Sep 03 2015 *)
  • PARI
    x='x+O('x^100); Vec((1-x-x^2)/((1-x)*(1+x^2+x^4))) \\ G. C. Greubel, Sep 07 2018
    

Formula

G.f.: (1 - x - x^2)/((1 - x)*(1 + x^2 + x^4)).
a(n) = -cos(2*Pi*n/3+Pi/3)/3 + sin(2*Pi*n/3+Pi/3)/sqrt(3) + 2*cos(Pi*n/3+Pi/6)/sqrt(3) - 1/3.

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).

A152191 a(n)=Product_{k=1..floor((n-1)/2)} (1 + 4*cos(k*Pi/n)^2)*(1 - 4*sin(k*Pi/n)^2).

Original entry on oeis.org

1, 1, 1, -4, -3, 5, 0, 13, 21, -68, -55, 89, 0, 233, 377, -1220, -987, 1597, 0, 4181, 6765, -21892, -17711, 28657, 0, 75025, 121393, -392836, -317811, 514229, 0, 1346269, 2178309, -7049156, -5702887, 9227465, 0, 24157817, 39088169, -126491972, -102334155
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Nov 28 2008

Keywords

Crossrefs

Cf. A152189.

Programs

  • Mathematica
    f[n_] = Product[(1 + 4*Cos[k*Pi/n]^2)*(1 - 4*Sin[k*Pi/n]^2), {k, 1, Floor[(n - 1)/2]}]; Table[N[f[n]], {n, 0, 30}]; Round[%]
  • PARI
    a(n) = round(prod(k=1, floor((n-1)/2), (1+4*cos(k*Pi/n)^2)*(1-4*sin(k*Pi/n)^2))) \\ Colin Barker, Apr 11 2014

Formula

Conjecture: a(2n) = A108196(n-1), n>=2. a(n) = (-1)^(n+1)*A000045(n) *A101675(n-1), n>0. G.f.: 1 -x*(x-1)*(x^2-x+1)*(1+x)^3 / ( (x^4-x^3+2*x^2+x+1)*(x^4+x^3+2*x^2-x+1) ). - R. J. Mathar, Mar 08 2011

Extensions

More terms from Colin Barker, Apr 11 2014
Showing 1-3 of 3 results.