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.

A161516 Expansion of 1 + 2*Sum_{n >= 1} (-q)^n*(1 + q^2)*(1 + q^4)*...*(1 + q^(2*k - 2))/ ((1 - q)*(1 - q^3)*...*(1 - q^(2*n - 1))).

Original entry on oeis.org

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

Views

Author

Jeremy Lovejoy, Jun 12 2009

Keywords

Comments

(-1)^n*a(n) is the number of inequivalent elements of norm 8*n-1 in Z[sqrt(2)].

Programs

  • Magma
    m:=80; R:=PowerSeriesRing(Integers(), m); [1] cat Coefficients(R!( 2*(&+[((-q)^n/(1+q^(2*n)))*(&*[(1-q^(4*k))/((1-q^(2*k))*(1-q^(2*k-1))): k in [1..n]]): n in [1..m]]) )); // G. C. Greubel, Dec 04 2018
    
  • Mathematica
    With[{m=80}, CoefficientList[Series[1+2*Sum[(-q)^n*QPochhammer[q^4, q^4]*QPochhammer[q^(2*n+1), q]/((1+q^(2*n))*QPochhammer[q^(4*n+4), q^4]*QPochhammer[q, q]), {n, 1, m}], {q, 0, m}], q]] (* G. C. Greubel, Dec 04 2018 *)
  • PARI
    m=80; my(q='q+O('q^m)); Vec(1 + 2*sum(n=1,m, ((-q)^n/(1+q^(2*n) ))*prod(k=1,n, (1-q^(4*k))/((1-q^(2*k))*(1-q^(2*k-1)))) )) \\ G. C. Greubel, Dec 04 2018
    
  • Sage
    from sage.combinat.q_analogues import q_pochhammer
    prec = 80
    R = PowerSeriesRing(ZZ, 'x')
    x = R.gen().O(prec)
    s = 1+2*sum( (-x)^n*q_pochhammer(n, x^4, x^4)/((1+x^(2*n))* q_pochhammer(2*n, x, x)) for n in (1..prec))
    print(s.coefficients()) # G. C. Greubel, Dec 04 2018