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.

A111165 Let qf(a,q) = Product(1-a*q^j,j=0..infinity); g.f. is qf(q,q^3)/qf(q^2,q^3).

Original entry on oeis.org

1, -1, 1, -1, 0, 1, -1, 0, 1, -2, 2, 0, -2, 2, -1, -1, 3, -2, -1, 3, -3, 0, 4, -5, 2, 3, -6, 4, 2, -7, 6, 0, -7, 9, -2, -7, 10, -5, -6, 13, -8, -5, 15, -13, -1, 16, -17, 2, 16, -22, 8, 16, -27, 14, 12, -30, 22, 9, -34, 29, 3, -36, 39, -5, -37, 47, -14, -36, 58, -26, -33, 66, -41, -26, 75, -56, -18, 81, -74, -4, 87, -94, 12, 87, -113, 34
Offset: 0

Views

Author

N. J. A. Sloane, Nov 09 2005

Keywords

Crossrefs

Cf. A111375. Convolution inverse of A111317.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          add(add(d*[0, -1, 1][irem(d, 3)+1],
          d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Apr 02 2014
  • Mathematica
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*{0, -1, 1}[[Mod[d, 3]+1]], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 28 2014, after Alois P. Heinz *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod(k=0, n\3, (1 - x^(3*k+1)) / (1 - x^(3*k+2)), 1 + x * O(x^n)), n))} /* Michael Somos, Dec 23 2007 */

Formula

Euler transform of period 3 sequence [ -1, 1, 0, ...]. - Michael Somos, Dec 23 2007
G.f.: Product_{k>=0} (1 - x^(3*k+1)) / (1 - x^(3*k+2)).