|
|
A158380
|
|
Number of solutions to +-1 +- 3 +- 6 +- ... +- n(n+1)/2 = 0.
|
|
9
|
|
|
1, 0, 0, 0, 2, 0, 2, 2, 4, 0, 12, 16, 26, 0, 66, 104, 210, 0, 620, 970, 1748, 0, 5948, 10480, 18976, 0, 60836, 111430, 209460, 0, 704934, 1284836, 2387758, 0, 8331820, 15525814, 28987902, 0, 101242982, 190267598, 358969426, 0, 1275032260, 2404124188, 4547419694
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
Equivalently, number of partitions of the set of the first n triangular numbers {t(1),...,t(n)} into two classes with equal sums.
Constant term in the expansion of (x + 1/x)(x^3 + 1/x^3)...(x^t(n) + 1/x^t(n)).
a(n) = 0 for all n == 1 (mod 4).
Andrica & Tomescu give a more general integral formula than the one below. - Jonathan Sondow, Nov 11 2013
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (2^n/Pi) * Integral_{x=0..Pi} cos(x)*cos(3x)*...*cos(n(n+1)x/2) dx.
a(n) ~ 2^(n+1)*sqrt(10/Pi)*n^(-5/2)*(1+o(1)) as n --> infinity, n !== 1 (mod 4).
|
|
EXAMPLE
|
For n=6 the 2 solutions are +1-3+6-10-15+21 = 0 and -1+3-6+10+15-21 = 0.
|
|
MAPLE
|
N:=70: p:=1: a:=[]: for n from 0 to N do
p:=expand(p*(x^(n*(n+1)/2)+x^(-n*(n+1)/2))):
a:=[op(a), coeff(p, x, 0)]: od:a;
# second Maple program:
b:= proc(n, i) option remember; (m-> `if`(n>m, 0,
`if`(n=m, 1, b(abs(n-i*(i+1)/2), i-1)+
b(n+i*(i+1)/2, i-1))))((2+(3+i)*i)*i/6)
end:
a:= n-> `if`(irem(n, 4)=1, 0, b(0, n)):
|
|
MATHEMATICA
|
a[n_] := With[{t = Table[k(k+1)/2, {k, 1, n}]}, Coefficient[Times @@ (x^t + 1/x^t), x, 0]];
|
|
PROG
|
(PARI) t(k) = k*(k+1)/2;
a(n) = polcoeff(prod(k=1, n, (x^t(k)+ 1/x^t(k))), 0); \\ Michel Marcus, May 19 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|