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.

A197870 Expansion of false theta series variation of Ramanujan theta function psi(x).

Original entry on oeis.org

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

Views

Author

Michael Somos, Oct 18 2011

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 - x + x^3 - x^6 + x^10 - x^15 + x^21 - x^28 + x^36 - x^45 + x^55 + ...
G.f. = q - q^9 + q^25 - q^49 + q^81 - q^121 + q^169 - q^225 + q^289 - q^361 + ...
		

Crossrefs

Cf. A010054.
Cf. A005169 (g.f.: G(0), where G(k) = 1/( 1 - q^(k+1)*G(k+1) ) ).

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ (-1)^k x^(k (k + 1)/2), {k, 0, (Sqrt[8 n + 1] - 1)/2}], {x, 0, n}]]; (* Michael Somos, Jul 21 2014 *)
    a[n_] := Module[{r, k}, r = Reduce[k >= 0 && 2n == k(k+1), k, Integers]; If[r === False, 0, (-1)^r[[2]] ] ]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Nov 27 2016 *)
  • PARI
    {a(n) = local(x); if( issquare( 8*n + 1, &x), (-1)^(x\2), 0)};

Formula

G.f.: Sum_{k>=0} (-1)^k * x^(k*(k+1)/2). |a(n)| = A010054(n).
G.f.: G(0) where G(k) = 1 - q^(k+1)*G(k+1) = 1 - q*(1 - q^2*(1 - q^3*(1 - q^4*(1 - ...)))). - Joerg Arndt, Jun 29 2013
G.f.: Sum_{k>=0} a(k) * x^(3*k) = 1 / (1+x) + x*(1-x) / ((1+x)*(1+x^2)*(1+x^3)) + x^2*(1-x)*(1-x^3) / ((1+x)*(1+x^2)*...*(1+x^5)) + ... - Michael Somos, Jul 21 2014