OFFSET
1,8
LINKS
Alois P. Heinz and Ray Chandler, Table of n, a(n) for n = 1..633 (first 280 terms from Alois P. Heinz)
FORMULA
a(n) = [x^(n*(n+1)/2)] Product_{k=1..n-1} (x^(k*(k+1)/2) + 1/x^(k*(k+1)/2)). - Ilya Gutkovskiy, Feb 01 2024
EXAMPLE
a(8) = 2 because there are two solutions: 1 - 3 + 6 + 10 + 15 - 21 + 28 - 36 = 1 - 3 - 6 + 10 - 15 + 21 + 28 - 36 = 0.
MAPLE
b:= proc(n, i) option remember; local m; m:= (2+(3+i)*i)*i/6;
`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)))
end:
a:= n-> `if`(irem(n, 4)=1, 0, b(n*(n+1)/2, n-1)):
seq(a(n), n=1..40); # Alois P. Heinz, Oct 31 2011
MATHEMATICA
b[n_, i_] := b[n, i] = With[{m = (2+(3+i)*i)*i/6}, 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]]]]; a[n_] := If[Mod[n, 4] == 1, 0, b[n*(n+1)/2, n-1]]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Jan 30 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Naohiro Nomoto, Dec 20 2000
EXTENSIONS
More terms from Sascha Kurz, Oct 13 2001
More terms from Alois P. Heinz, Oct 31 2011
STATUS
approved