login
Search: a005879 -id:a005879
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of ways of writing n as a sum of 4 squares; also theta series of four-dimensional cubic lattice Z^4.
+10
198
1, 8, 24, 32, 24, 48, 96, 64, 24, 104, 144, 96, 96, 112, 192, 192, 24, 144, 312, 160, 144, 256, 288, 192, 96, 248, 336, 320, 192, 240, 576, 256, 24, 384, 432, 384, 312, 304, 480, 448, 144, 336, 768, 352, 288, 624, 576, 384, 96, 456, 744, 576, 336, 432, 960, 576, 192
OFFSET
0,2
COMMENTS
a^2 + b^2 + c^2 + d^2 is one of Ramanujan's 54 universal quaternary quadratic forms. - Michael Somos, Apr 01 2008
a(n) is also the number of quaternions q = a + bi + cj + dk, where a, b, c, d are integers, such that a^2 + b^2 + c^2 + d^2 = n (i.e., so that n is the norm of q). These are Lipschitz integer quaternions. - Rick L. Shepherd, Mar 27 2009
Number 5 and 35 of the 126 eta-quotients listed in Table 1 of Williams 2012. - Michael Somos, Nov 10 2018
This is the convolution square of A004018. - Pierre Abbat, May 15 2023
REFERENCES
J. H. Conway and R. K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996, ch. 8, pp. 231-2.
J. H. Conway and N. J. A. Sloane, Sphere Packing, Lattices and Groups, Springer-Verlag, p. 108, Eq. (49).
N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.28). See also top of p. 94.
E. Freitag and R. Busam, Funktionentheorie 1, 4. Auflage, Springer, 2006, p. 392.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 314, Theorem 386.
Carlos J. Moreno and Samuel S. Wagstaff, Jr., Sums of Squares of integers, Chapman & Hall/CRC, 2006, p. 29.
S. Ramanujan, Collected Papers, Chap. 20, Cambridge Univ. Press 1927 (Proceedings of the Camb. Phil. Soc., 19 (1917) 11-21).
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..50000 (first 10000 terms from T. D. Noe)
George E. Andrews, S. B. Ekhad, and D. Zeilberger A Short Proof of Jacobi's Formula for the Number of Representations of an Integer as a Sum of Four Squares, arXiv:math/9206203 [math.CO], 1992.
George E. Andrews, Sumit Kumar Jha, and J. López-Bonilla, Sums of Squares, Triangular Numbers, and Divisor Sums, Journal of Integer Sequences, Vol. 26 (2023), Article 23.2.5.
Michael Ball and Dario Alejandro Alpern, Every positive integer is a sum of four integer squares
Cristina Ballantine and Mircea Merca, Jacobi's four and eight squares theorems and partitions into distinct parts, Mediterr. J. Math 16 (2009) 26.
R. T. Bumby, Sums of four squares, in Number theory (New York, 1991-1995), 1-8, Springer, New York, 1996.
R. T. Bumby, Sums of four squares [Cached copy]
H. H. Chan and C. Krattenthaler, Recent progress in the study of representations of integers as sums of squares, arXiv:math/0407061 [math.NT], 2004.
Fern Gossow, Lyndon-like cyclic sieving and Gauss congruence, arXiv:2410.05678 [math.CO], 2024. See p. 26.
E. Grosswald, Representations of Integers as Sums of an Even Number of Squares, Springer-Verlag, NY, 1985, p. 121.
M. D. Hirschhorn, A Simple Proof of Jacobi's Four-Square Theorem, Proceedings of the American Mathematical Society, Vol. 101, No. 3 (Nov., 1987), pp. 436-438
Masao Koike, Modular forms on non-compact arithmetic triangle groups, Unpublished manuscript [Extensively annotated with OEIS A-numbers by N. J. A. Sloane, Feb 14 2021. I wrote 2005 on the first page but the internal evidence suggests 1997.]
G. Nebe and N. J. A. Sloane, The lattice Z4
B. K. Spearman and K. S. Williams, The simplest arithmetic proof of Jacobi's four squares theorem, Far East Journal of Mathematical Sciences 2.3 (2000): 433-440.
Eric van Fossen Conrad, Jacobi's Four Square Theorem
Min Wang and Zhi-Hong Sun, On the number of representations of n as a linear combination of four triangular numbers II, arXiv:1511.00478 [math.NT], 2015.
Eric W. Weisstein, Quaternion Norm.
K. S. Williams, Fourier series of a class of eta quotients, Int. J. Number Theory 8 (2012), no. 4, 993-1004.
K. S. Williams, The parents of Jacobi's four squares theorem are unique, Amer. Math. Monthly, 120 (2013), 329-345.
FORMULA
G.f.: theta_3(q)^4 = (Product_{n>=1} (1-q^(2n))*(1+q^(2n-1))^2)^4 = eta(-q)^8/eta(q^2)^4; eta = Dedekind's function.
a(n) = 8*sigma(n) - 32*sigma(n/4) for n > 0, where the latter term is 0 if n is not a multiple of 4.
Euler transform of period 4 sequence [8, -12, 8, -4, ...]. - Michael Somos, Dec 16 2002
G.f. A(x) satisfies 0 = f(A(x), A(x^3), A(x^9)) where f(u, v, w) = v^4 - 30*u*v^2*w + 12*u*v*w*(u + 9*w) - u*w*(u^2 + 9*w*u + 81*w^2). - Michael Somos, Nov 02 2006
G.f. is a period 1 Fourier series which satisfies f(-1/(4*t)) = 4*(t/i)^2*f(t) where q = exp(2*Pi*i*t). - Michael Somos, Jan 25 2008
For n > 0, a(n)/8 is multiplicative and a(p^n)/8 = 1 + p + p^2 + ... + p^n for p an odd prime, a(2^n)/8 = 1 + 2 for n > 0.
a(n) = 8*A000203(n/A006519(n))*(2 + (-1)^n). - Benoit Cloitre, May 16 2002
G.f.: 1 + 8*Sum_{k>0} x^k / (1 + (-x)^k)^2 = 1 + 8*Sum_{k>0} k * x^k / (1 + (-x)^k).
G.f. = s(2)^20/(s(1)*s(4))^8, where s(k) := subs(q=q^k, eta(q)), where eta(q) is Dedekind's function, cf. A010815. [Fine]
Fine gives another explicit formula for a(n) in terms of the divisors of n.
a(n) = 8*A046897(n), n > 0. - Ralf Stephan, Apr 02 2003
A096727(n) = (-1)^n * a(n). a(2*n) = A004011(n). a(2*n + 1) = A005879(n).
Dirichlet g.f.: Sum_{n>=1} a(n)/n^s = 8*(1-4^(1-s))*zeta(s)*zeta(s-1). [Ramanu. J. 7 (2003) 95-127, eq (3.2)]. - R. J. Mathar, Jul 02 2012
Average value is (Pi^2/2)*n + O(sqrt(n)). - Charles R Greathouse IV, Feb 17 2015
From Wolfdieter Lang, Jan 14 2016: (Start)
For n >= 1: a(n) = 8*Sum_{d | n} b(d)*d, with b(d) = 1 if d/4 is not an integer else 0. See, e.g., the Freitag-Busam reference, p. 392.
For n >= 1: a(n) = 8*sigma(n) if n is odd else 24*sigma(m(n)), where m(n) is the largest odd divisor of n (see A000265), and sigma is given in A000203. See the Moreno-Wagstaff reference, Theorem 2. 6 (Jacobi), p. 29. (End)
a(n) = (8/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
EXAMPLE
G.f. = 1 + 8*q + 24*q^2 + 32*q^3 + 24*q^4 + 48*q^5 + 96*q^6 + 64*q^7 + 24*q^8 + ...
a(1)=8 counts 1 = 1^2 + 0^2 + 0^2 + 0^2 = 0^2 + 1^2 + 0^2 + 0^2 = 0^2 + 0^2 + 1^2 + 0^2 = 0^2 + 0^2 + 0^2 + 1^2 and 4 more sums where 1^2 is replaced by (-1)^2. - R. J. Mathar, May 16 2023
MAPLE
(add(q^(m^2), m=-10..10))^4; seq(coeff(%, q, n), n=0..50);
# Alternative:
A000118list := proc(len) series(JacobiTheta3(0, x)^4, x, len+1);
seq(coeff(%, x, j), j=0..len-1) end: A000118list(57); # Peter Luschny, Oct 02 2018
MATHEMATICA
Table[SquaresR[4, n], {n, 0, 46}]
a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q]^4, {q, 0, n}]; (* Michael Somos, Jun 12 2014 *)
a[ n_] := If[ n < 1, Boole[ n == 0], 8 Sum[ If[ Mod[ d, 4] > 0, d, 0], {d, Divisors @ n }]]; (* Michael Somos, Feb 20 2015 *)
QP = QPochhammer; CoefficientList[QP[-q]^8/QP[q^2]^4 + O[q]^60, q] (* Jean-François Alcover, Nov 24 2015 *)
PROG
(PARI) {a(n) = if( n<1, n==0, 8 * sumdiv( n, d, if( d%4, d)))}; /* Michael Somos, Apr 01 2003 */
(PARI) {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A)^5 / (eta(x + A)^2 * eta(x^4 + A)^2))^4, n))}; /* Michael Somos, Apr 01 2008 */
(PARI) q='q+O('q^66); Vec((eta(q^2)^5/(eta(q)^2*eta(q^4)^2))^4) /* Joerg Arndt, Apr 08 2013 */
(PARI) a(n) = 8*sigma(n) - if (n % 4, 0, 32*sigma(n/4)); \\ Michel Marcus, Jul 13 2016
(Sage) A = ModularForms( Gamma0(4), 2, prec=57) . basis(); A[0] + 8*A[1]; # Michael Somos, Jun 12 2014
(Sage)
Q = DiagonalQuadraticForm(ZZ, [1]*4)
Q.representation_number_list(60) # Peter Luschny, Jun 20 2014
(Magma) A := Basis( ModularForms( Gamma0(4), 2), 57); A[1] + 8*A[2]; /* Michael Somos, Aug 21 2014 */
(Haskell)
a000118 0 = 1
a000118 n = 8 * a046897 n -- Reinhard Zumkeller, Aug 12 2015
(Julia) # JacobiTheta3 is defined in A000122.
A000118List(len) = JacobiTheta3(len, 4)
A000118List(57) |> println # Peter Luschny, Mar 12 2018
(Python)
from sympy import divisors
def a(n): return 1 if n==0 else 8*sum(d for d in divisors(n) if d%4 != 0)
print([a(n) for n in range(57)]) # Michael S. Branicky, Jan 08 2021
(Python)
from sympy import divisor_sigma
def A000118(n): return 1 if n == 0 else 8*divisor_sigma(n) if n % 2 else 24*divisor_sigma(int(bin(n)[2:].rstrip('0'), 2)) # Chai Wah Wu, Jun 27 2022
CROSSREFS
Row d=4 of A122141 and of A319574, 4th column of A286815.
For number of solutions to a^2+b^2+c^2+k*d^2=n for k=1, 2, 3, 4, 5, 6, 7, 8, 12, see A000118, A236928, A236926, A236923, A236930, A236931, A236932, A236927, A236933.
KEYWORD
nonn,easy,nice,changed
STATUS
approved
Sum of divisors of 2*n + 1.
+10
75
1, 4, 6, 8, 13, 12, 14, 24, 18, 20, 32, 24, 31, 40, 30, 32, 48, 48, 38, 56, 42, 44, 78, 48, 57, 72, 54, 72, 80, 60, 62, 104, 84, 68, 96, 72, 74, 124, 96, 80, 121, 84, 108, 120, 90, 112, 128, 120, 98, 156, 102, 104, 192, 108, 110, 152, 114, 144, 182, 144, 133, 168
OFFSET
0,2
COMMENTS
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Number of ways of writing n as the sum of 4 triangular numbers.
Bisection of A000203. - Omar E. Pol, Mar 14 2012
a(n) is also the total number of parts in all partitions of 2*n + 1 into equal parts. - Omar E. Pol, Feb 14 2021
REFERENCES
B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 139 Ex. (iii).
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 2, p. 19 eq. (6), and p. 283 eq. (8).
W. Dunham, Euler: The Master of Us All, The Mathematical Association of America Inc., Washington, D.C., 1999, p. 12.
H. M. Farkas, I. Kra, Cosines and triangular numbers, Rev. Roumaine Math. Pures Appl., 46 (2001), 37-43.
N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 79, Eq. (32.31).
N. Koblitz, Introduction to Elliptic Curves and Modular Forms, Springer-Verlag, 1984, see p. 184, Prop. 4, F(z).
G. Polya, Induction and Analogy in Mathematics, vol. 1 of Mathematics and Plausible Reasoning, Princeton Univ. Press, 1954, page 92 ff.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..20000 (first 10000 terms from T. D. Noe)
H. Cohen, Sums involving the values at negative integers of L-functions of quadratic characters, Math. Ann. 217 (1975), no. 3, 271-285. MR0382192 (52 #3080)
M. D. Hirschhorn, The number of representations of a number by various forms, Discrete Mathematics 298 (2005), 205-211
Masao Koike, Modular forms on non-compact arithmetic triangle groups, Unpublished manuscript [Extensively annotated with OEIS A-numbers by N. J. A. Sloane, Feb 14 2021. I wrote 2005 on the first page but the internal evidence suggests 1997.]
K. Ono, S. Robins and P. T. Wahl, On the representation of integers as sums of triangular numbers, Aequationes mathematicae, August 1995, Volume 50, Issue 1-2, pp 73-94. Theorem 3 [Legendre].
H. Rosengren, Sums of triangular numbers from the Frobenius determinant, arXiv:math/0504272 [math.NT], 2005.
Min Wang and Zhi-Hong Sun, On the number of representations of n as a linear combination of four triangular numbers II, arXiv:1511.00478 [math.NT], 2015.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
K. S. Williams, The parents of Jacobi's four squares theorem are unique, Amer. Math. Monthly, 120 (2013), 329-345.
FORMULA
Expansion of q^(-1/2) * (eta(q^2)^2 / eta(q))^4 = psi(q)^4 in powers of q where psi() is a Ramanujan theta function. - Michael Somos, Apr 11 2004
Expansion of Jacobi theta_2(q)^4 / (16*q) in powers of q^2. - Michael Somos, Apr 11 2004
Euler transform of period 2 sequence [4, -4, 4, -4, ...]. - Michael Somos, Apr 11 2004
a(n) = b(2*n + 1) where b() is multiplicative and b(2^e) = 0^n, b(p^e) =(p^(e+1) - 1) / (p - 1) if p>2. - Michael Somos, Jul 07 2004
Given g.f. A(x), then B(q) = q * A(q^2) satisfies 0 = f(B(q), B(q^2), B(q^4)) where f(u, v, w) = v^3 + 8*w*v^2 + 16*w^2*v - u^2*w - Michael Somos, Apr 08 2005
Given g.f. A(x), then B(q) = q * A(q^2) satisfies 0 = f(B(q), B(q^3), B(q^9)) where f(u, v, w) = v^4 - 30*u*v^2*w + 12*u*v*w*(u + 9*w) - u*w*(u^2 + 9*w*u + 81*w^2).
Given g.f. A(x), then B(q) = q * A(q^2) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u2^3 + u1^2*u6 + 3*u2*u3^2 + 27*u6^3 - u1*u2*u3 - 3*u1*u3*u6 - 7*u2^2*u6 - 21*u2*u6^2. - Michael Somos, May 30 2005
G.f.: Sum_{k>=0} (2k + 1) * x^k / (1 - x^(2k + 1)).
G.f.: (Product_{k>0} (1 - x^k) * (1 + x^k)^2)^4. - Michael Somos, Apr 11 2004
G.f. Sum_{k>=0} a(k) * x^(2k + 1) = x( * Prod_{k>0} (1 - x^(4*k))^2 / (1 - x^(2k)))^ 4 = x * (Sum_{k>0} x^(k^2 - k))^4 = Sum_{k>0} k * (x^k / (1 - x^k) - 3 * x^(2*k) / (1 - x^(2*k)) +2 * x^(4*k) / (1 - x^(4*k))). - Michael Somos, Jul 07 2004
Number of solutions of 2*n + 1 = (x^2 + y^2 + z^2 + w^2) / 4 in positive odd integers. - Michael Somos, Apr 11 2004
8 * a(n) = A005879(n) = A000118(2*n + 1). 16 * a(n) = A129588(n). a(n) = A000593(2*n + 1) = A115607(2*n + 1).
a(n) = A000203(2*n+1). - Omar E. Pol, Mar 14 2012
G.f. is a period 1 Fourier series which satisfies f(-1 / (4 t)) = (1/4) (t/i)^2 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A096727. Michael Somos, Jun 12 2014
a(0) = 1, a(n) = (4/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, May 06 2017
G.f.: exp(Sum_{k>=1} 4*(x^k/k)/(1 + x^k)). - Ilya Gutkovskiy, Jul 31 2017
From Peter Bala, Jan 10 2021: (Start)
a(n) = A002131(2*n+1).
G.f.: Sum_{n >= 0} x^n*(1 + x^(2*n+1))/(1 - x^(2*n+1))^2. (End)
Sum_{k=1..n} a(k) ~ Pi^2 * n^2 / 8. - Vaclav Kotesovec, Aug 07 2022
Convolution of A125061 and A138741. - Michael Somos, Mar 04 2023
EXAMPLE
Divisors of 9 are 1,3,9, so a(4)=1+3+9=13.
F_2(z) = eta(4z)^8/eta(2z)^4 = q + 4q^3 + 6q^5 +8q^7 + 13q^9 + ...
G.f. = 1 + 4*x + 6*x^2 + 8*x^3 + 13*x^4 + 12*x^5 + 14*x^6 + 24*x^7 + 18*x^8 + 20*x^9 + ...
B(q) = q + 4*q^3 + 6*q^5 + 8*q^7 + 13*q^9 + 12*q^11 + 14*q^13 + 24*q^15 + 18*q^17 + ...
MAPLE
A008438 := proc(n) numtheory[sigma](2*n+1) ; end proc: # R. J. Mathar, Mar 23 2011
MATHEMATICA
DivisorSigma[1, 2 # + 1] & /@ Range[0, 61] (* Ant King, Dec 02 2010 *)
a[ n_] := SeriesCoefficient[ D[ Series[ Log[ QPochhammer[ -x] / QPochhammer[ x]], {x, 0, 2 n + 1}], x], {x, 0 , 2n}]; (* Michael Somos, Oct 15 2019 *)
PROG
(PARI) {a(n) = if( n<0, 0, sigma( 2*n + 1))};
(PARI) {a(n) = if( n<0, 0, n = 2*n; polcoeff( sum( k=1, (sqrtint( 4*n + 1) + 1)\2, x^(k^2 - k), x * O(x^n))^4, n))}; /* Michael Somos, Sep 17 2004 */
(PARI) {a(n) = my(A); if( n<0, 0, n = 2*n; A = x * O(x^n); polcoeff( (eta(x^4 + A)^2 / eta(x^2 + A))^4, n))}; /* Michael Somos, Sep 17 2004 */
(Sage) ModularForms( Gamma0(4), 2, prec=124).1; # Michael Somos, Jun 12 2014
(Magma) Basis( ModularForms( Gamma0(4), 2), 124) [2]; /* Michael Somos, Jun 12 2014 */
(Haskell)
a008438 = a000203 . a005408 -- Reinhard Zumkeller, Sep 22 2014
(Magma) [DivisorSigma(1, 2*n+1): n in [0..70]]; // Vincenzo Librandi, Aug 01 2017
CROSSREFS
Number of ways of writing n as a sum of k triangular numbers, for k=1,...: A010054, A008441, A008443, A008438, A008439, A008440, A226252, A007331, A226253, A226254, A226255, A014787, A014809.
KEYWORD
nonn,easy,nice
EXTENSIONS
Comments from Len Smiley, Enoch Haga
STATUS
approved
Expansion of eta(q)^8 / eta(q^2)^4 in powers of q.
+10
17
1, -8, 24, -32, 24, -48, 96, -64, 24, -104, 144, -96, 96, -112, 192, -192, 24, -144, 312, -160, 144, -256, 288, -192, 96, -248, 336, -320, 192, -240, 576, -256, 24, -384, 432, -384, 312, -304, 480, -448, 144, -336, 768, -352, 288, -624, 576, -384, 96, -456, 744, -576, 336, -432, 960, -576, 192
OFFSET
0,2
COMMENTS
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
LINKS
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
K. S. Williams, The parents of Jacobi's four squares theorem are unique, Amer. Math. Monthly, 120 (2013), 329-345.
FORMULA
a(n) = -8*sigma(n) + 48*sigma(n/2) - 64*sigma(n/4) for n>0, where sigma(n) = A000203(n) if n is an integer, otherwise 0.
Euler transform of period 2 sequence [ -8, -4, ...].
G.f.: Prod_{k>0} (1 - x^k)^8 / (1 - x^(2k))^4 = 1 + Sum_{k>0} k * (-8 * x^k / (1 - x^k) + 48 * x^(2*k) /(1 - x^(2*k)) - 64 * x^(4*k)/(1 - x^(4*k))).
G.f. theta_4(q)^4 = (Sum_{k} (-q)^(k^2))^4.
Expansion of phi(-q)^4 in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Nov 01 2006
G.f. A(x) satisfies 0 = f(A(x), A(x^3), A(x^9)) where f(u, v, w) = v^4 - 30*u*v^2*w + 12*u*v*w * (u + 9*w) - u*w * (u^2 + 9*w*u + 81*w^2).
a(n) = (-1)^n * A000118(n). a(n) = 8 * A109506(n) unless n=0. a(2*n) = A004011(n). a(2*n + 1) = -A005879(n).
a(0) = 1, a(n) = -(8/n)*Sum_{k=1..n} A002131(k)*a(n-k) for n > 0. - Seiichi Manyama, May 02 2017
EXAMPLE
G.f. = 1 - 8*q + 24*q^2 - 32*q^3 + 24*q^4 - 48*q^5 + 96*q^6 - 64*q^7 + 24*q^8 - ...
MATHEMATICA
CoefficientList[ Series[1 + Sum[k(-8x^k/(1 - x^k) + 48x^(2k)/(1 - x^(2k)) - 64x^(4k)/(1 - x^(4k))), {k, 1, 60}], {x, 0, 60}], x] (* Robert G. Wilson v, Jul 14 2004 *)
a[ n_] := With[{m = InverseEllipticNomeQ @ q}, SeriesCoefficient[ q Dt[ Log @ m, q], {q, 0, n}]]; (* Michael Somos, Sep 06 2012 *)
a[ n_] := (-1)^n SquaresR[ 4, n]; (* Michael Somos, Jun 12 2014 *)
a[ n_] := SeriesCoefficient[ EllipticTheta[ 4, 0, q]^4, {q, 0, n}]; (* Michael Somos, Jun 12 2014 *)
QP = QPochhammer; s = QP[q]^8/QP[q^2]^4 + O[q]^60; CoefficientList[s, q] (* Jean-François Alcover, Nov 23 2015 *)
PROG
(PARI) {a(n) = if( n<1, n==0, 8 * (-1)^n * sumdiv( n, d, if( d%4, d)))};
(PARI) {a(n) = local(A); if( n<0, 0, A = x *O (x^n); polcoeff( eta(x + A)^8 / eta(x^2 + A)^4, n))};
(Sage) A = ModularForms( Gamma0(4), 2, prec=57) . basis(); A[0] - 8*A[1]; # Michael Somos, Jun 12 2014
(Magma) A := Basis( ModularForms( Gamma0(4), 2), 57); A[1] - 8*A[2]; /* Michael Somos, Aug 21 2014 */
(Julia) # JacobiTheta4 is defined in A002448.
A096727List(len) = JacobiTheta4(len, 4)
A096727List(57) |> println # Peter Luschny, Mar 12 2018
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Jul 06 2004
STATUS
approved

Search completed in 0.016 seconds