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.

A163806 Expansion of (1 - x^3) * (1 - x^4) / ((1 - x) * (1 - x^6)) in powers of x.

Original entry on oeis.org

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

Views

Author

Michael Somos, Aug 04 2009

Keywords

Examples

			G.f. = 1 + x + x^2 - x^4 - x^5 + x^7 + x^8 - x^10 - x^11 + x^13 + x^14 + ...
		

Crossrefs

Programs

  • Magma
    I:=[1,1]; [1] cat [n le 2 select I[n] else Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 15 2018
  • Mathematica
    Join[{1},LinearRecurrence[{1, -1},{1, 1},104]] (* Ray Chandler, Sep 15 2015 *)
  • PARI
    {a(n) = (n==0) + [0, 1, 1, 0, -1, -1][n%6 + 1]};
    
  • PARI
    {a(n) = (n==0) - (-1)^n * kronecker(-3, n)};
    

Formula

Euler transform of length 6 sequence [1, -1, -1, 0, 0, 1].
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = u^2 * (2*v - 1) - (3*v - 2) * (2*u - 1).
a(n) is multiplicative with a(3^e) = 0^e, a(2^e) = -(-1)^e if e>0, a(p^e) = 1 if p == 1 (mod 6), a(p^e) = (-1)^e if p == 5 (mod 6).
a(3*n) = 0 unless n=0, a(6*n + 4) = a(6*n + 5) = -1, a(6*n + 1) = a(6*n + 2) = a(0) = 1.
a(-n) = -a(n) unless n=0. a(n+3) = -a(n) unless n=0 or n=-3.
G.f.: (1 + x^2) / (1 - x + x^2). - Corrected by Bruno Berselli, Apr 06 2011
G.f.: A(x) = 1 / (1 - x / (1 + x^2)) = 1 + x / (1 - x / (1 + x / (1 - x))). - Michael Somos, Jan 03 2013
A128834(n) = a(n) unless n=0. A163810(n) = -a(n) unless n=0. A163804(n) = (-1)^n * a(n). Convolution inverse of A163805.