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.

A164117 Expansion of (1 - x) * (1 - x^10) / ((1 - x^2) * (1 - x^4) * (1 - x^5)) in powers of x.

Original entry on oeis.org

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

Views

Author

Michael Somos, Aug 10 2009

Keywords

Comments

Convolution inverse of A164118.

Examples

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

Crossrefs

Programs

  • Magma
    m:=100; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x)*(1-x^10)/((1-x^2)*(1-x^4)*(1-x^5)))); // G. C. Greubel, Sep 25 2018
  • Mathematica
    CoefficientList[Series[(1-x)(1-x^10)/((1-x^2)(1-x^4)(1-x^5)),{x,0,120}], x] (* Harvey P. Dale, Nov 28 2014 *)
  • PARI
    {a(n) = (-1)^n - (n==0) + (n%4==0)};
    
  • PARI
    {a(n) = -(n==0) + [2, -1, 1, -1][n%4 + 1]};
    

Formula

Euler transform of length 10 sequence [-1, 1, 0, 1, 1, 0, 0, 0, 0, -1].
a(n) = -b(n) where b(n) is multiplicative with b(2) = -1, b(2^e) = -2 if e>1, b(p^e) = 1 if p>2.
a(n) = a(-n) for all n in Z. a(n+4) = a(n) unless n=0 or n=-4.
G.f.: (1 - x + x^2 - x^3 + x^4) / (1 - x^4).
a(n) = (-1)^n * A164415(n).