|
|
A002107
|
|
Expansion of Product_{k>=1} (1 - x^k)^2.
(Formerly M0091 N0028)
|
|
23
|
|
|
1, -2, -1, 2, 1, 2, -2, 0, -2, -2, 1, 0, 0, 2, 3, -2, 2, 0, 0, -2, -2, 0, 0, -2, -1, 0, 2, 2, -2, 2, 1, 2, 0, 2, -2, -2, 2, 0, -2, 0, -4, 0, 0, 0, 1, -2, 0, 0, 2, 0, 2, 2, 1, -2, 0, 2, 2, 0, 0, -2, 0, -2, 0, -2, 2, 0, -4, 0, 0, -2, -1, 2, 0, 2, 0, 0, 0, -2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Number of partitions of n into an even number of distinct parts minus number of partitions of n into an odd number of distinct parts, with 2 types of each part. E.g., for n=4, we consider k and k* to be different versions of k and so we have 4, 4*, 31, 31*, 3*1, 3*1*, 22*, 211*, 2*11*. The even partitions number 5 and the odd partitions number 4, so a(4)=5-4=1. - Jon Perry, Apr 04 2004
Also, number of partitions of n into parts of -2 different kinds (based upon formal analogy). - Michele Dondi (blazar(AT)lcm.mi.infn.it), Jun 29 2004
Number 68 of the 74 eta-quotients listed in Table I of Martin (1996).
|
|
REFERENCES
|
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
Expansion of q^(-1/12) * eta(q)^2 in powers of q. - Michael Somos, Mar 06 2012
Euler transform of period 1 sequence [ -2, ...]. - Michael Somos, Mar 06 2012
a(n) = b(12*n + 1) where b(n) is multiplicative and b(2^e) = b(3^e) = 0^e, b(p^e) = (1 + (-1)^e) / 2 if p == 7, 11 (mod 12), b(p^e) = (-1)^(e/2) * (1 + (-1)^e) / 2 if p == 5 (mod 12), b(p^e) = (e + 1) * (-1)^(e*x) if p == 1 (mod 12) where p = x^2 + 9*y^2. - Michael Somos, Sep 16 2006
a(0) = 1, a(n) = -(2/n)*Sum{k = 0..n-1} a(k)*sigma_1(n-k). - Joerg Arndt, Feb 05 2011
Expansion of f(-x)^2 in powers of x where f() is a Ramanujan theta function. - Michael Somos, May 17 2015
G.f. is a period 1 Fourier series which satisfies f(-1 / (144 t)) = 12 (t/i) f(t) where q = exp(2 Pi i t). - Michael Somos, May 17 2015
G.f.: Sum_{m, n in Z, n >= 2*|m|} (-1)^n * x^((3*(2*n + 1)^2 - (6*m + 1)^2)/24). - Seiichi Manyama, Oct 01 2016
For prime p congruent to 5, 7 or 11 (mod 12), a(n*p^2 + (p^2 - 1)/12) = e*a(n), where e = 1 if p == 7 or 11 (mod 12) and e = -1 if p == 5 (mod 12).
If n and p are coprime then a(n*p + (p^2 - 1)/12) = 0. See Cooper et al., Theorem 1. (End)
With the convention that a(n) = 0 for n < 0 we have the recurrence a(n) = A010816(n) + Sum_{k a nonzero integer} (-1)^(k+1)*a(n - k*(3*k-1)/2), where A010816(n) = (-1)^m*(2*m+1) if n = m*(m + 1)/2, with m positive, is a triangular number else equals 0. For example, n = 10 = (4*5)/2 is a triangular number, A010816(10) = 9, and so a(10) = 9 + a(9) + a(8) - a(5) - a(3) = 9 - 2 - 2 - 2 - 2 = 1. - Peter Bala, Apr 06 2022
|
|
EXAMPLE
|
G.f. = 1 - 2*x - x^2 + 2*x^3 + x^4 + 2*x^5 - 2*x^6 - 2*x^8 - 2*x^9 + x^10 + ...
G.f. = q - 2*q^13 - q^25 + 2*q^37 + q^49 + 2*q^61 - 2*q^73 - 2*q^97 - 2*q^109 + ...
|
|
MAPLE
|
A010816 := proc (n); if frac(sqrt(8*n+1)) = 0 then (-1)^((1/2)*isqrt(8*n+1)-1/2)*isqrt(8*n+1) else 0 end if; end proc:
N := 10:
a := proc (n) option remember; if n < 0 then 0 else A010816(n) + add( (-1)^(k+1)*a(n - (1/2)*k*(3*k-1) ), k = -N..-1) + add( (-1)^(k+1)*a(n - (1/2)*k*(3*k-1) ), k = 1..N) end if; end proc:
|
|
MATHEMATICA
|
terms = 78; Clear[s]; s[n_] := s[n] = Product[(1 - x^k)^2, {k, 1, n}] // Expand // CoefficientList[#, x]& // Take[#, terms]&; s[n = 10]; s[n = 2*n]; While[s[n] != s[n - 1], n = 2*n]; A002107 = s[n] (* Jean-François Alcover, Jan 17 2013 *)
a[ n_] := SeriesCoefficient[ QPochhammer[ x]^2, {x, 0, n}]; (* Michael Somos, Jan 31 2015 *)
a[ n_] := SeriesCoefficient[ Product[ 1 - x^k, {k, n}]^2, {x, 0, n}]; (* Michael Somos, Jan 31 2015 *)
|
|
PROG
|
(PARI) {a(n) = my(A, p, e, x); if( n<0, 0, n = 12*n + 1; A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p<5, 0, p%12>1, if( e%2, 0, (-1)^((p%12==5) * e/2)), for( i=1, sqrtint(p\9), if( issquare(p - 9*i^2), x=i; break)); (e + 1) * (-1)^(e*x))))}; /* Michael Somos, Aug 30 2006 */
(PARI) {a(n) = if( n<0, 0, polcoeff( eta(x + x * O(x^n))^2, n))}; /* Michael Somos, Aug 30 2006 */
(Magma) Basis( CuspForms( Gamma1(144), 1), 926) [1]; /* Michael Somos, May 17 2015 */
(Julia) # DedekindEta is defined in A000594.
A002107List(len) = DedekindEta(len, 2)
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,nice
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|