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.

A003475 Expansion of Sum_{k>0} (-1)^(k+1) q^(k^2) / ((1-q)(1-q^3)(1-q^5)...(1-q^(2k-1))).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

|a(n)|<3 if n<1036, a(1036)=3. - Michael Somos, Sep 16 2006

Examples

			G.f. = x + x^2 + x^3 - x^7 - x^8 - x^10 - x^11 - x^13 + x^15 - x^16 + ...
		

References

  • F. J. Dyson, A walk through Ramanujan's garden, pp. 7-28 of G. E. Andrews et al., editors, Ramanujan Revisited. Academic Press, NY, 1988.
  • F. J. Dyson, Selected Papers, Am. Math. Soc., 1996, p. 204.

Crossrefs

Programs

  • Maple
    P:=n->mul((1-q^(2*i+1)),i=0..n-1):
    t5:=add((-1)^(n+1)*q^(n^2)/P(n),n=1..40):
    t6:=series(t5,q,40); # Based on Patkowski, 2010, Eq. 3.1. - N. J. A. Sloane, Jun 29 2011
  • Mathematica
    a[ n_] := SeriesCoefficient[ 1 - QHypergeometricPFQ[ {x^2}, {x}, x^2, x], {x, 0, n}]; (* Michael Somos, Feb 02 2015 *)
  • PARI
    {a(n) = local(A, p, e, x, y); if( n<0, 0, n = 24*n-1; A = factor(n); prod(k=1, matsize(A)[1], if( p=A[k, 1], e=A[k, 2]; if( p<5, 0, if( p%24>1 && p%24<23, if( e%2, 0, if( p%24==7 || p%24==17, (-1)^(e/2), 1)), x=y=0; if( p%24==1, forstep(i=1, sqrtint(p), 2, if( issquare( (i^2 + p) / 2, &y), x=i; break)), for(i=1, sqrtint(p\2), if( issquare( 2*i^2 + p,&x), y=i; break))); (e+1) * (-1)^( (x + if((x-y)%6, y, -y)) / 6*e))))) / -2)}; /* Michael Somos, Aug 17 2006 */
    
  • PARI
    {a(n) = local(A); if( n<1, 0, A = -1 + x * O(x^n); polcoeff( sum(k=1, sqrtint(n), A *= 1 / (1 - x^(1 - 2*k)) * (1 + x * O(x^(n - k^2)))), n))}; /* Michael Somos, Sep 16 2006 */

Formula

Define c(24*k + 1) = A003406(k), c(24*k - 1) = -2*A003475(k), c(n) = 0 otherwise. Then c(n) is multiplicative with c(2^e) = c(3^e) = 0^e, c(p^e) = (-1)^(e/2) * (1 + (-1)^e) / 2 if p == 7, 17 (mod 24), c(p^e) = (1 + (-1)^e) / 2 if p == 5, 11, 13, 19 (mod 24), c(p^e) = (e+1)*(-1)^(y*e) where p == 1, 23 (mod 24) and p = x^2 - 72*y^2 . - Michael Somos, Aug 17 2006
G.f.: x + x^2 * (1 - x^2) + x^3 * (1 - x^2) * (1 - x^4) + x^4 * (1 - x^2) * (1 - x^4) * (1 - x^6) + ... . - Michael Somos, Aug 18 2006