|
|
A063866
|
|
Number of solutions to +- 1 +- 2 +- 3 +- ... +- n = 1.
|
|
18
|
|
|
0, 1, 1, 0, 0, 3, 5, 0, 0, 23, 40, 0, 0, 221, 397, 0, 0, 2410, 4441, 0, 0, 28460, 53222, 0, 0, 353743, 668273, 0, 0, 4559828, 8679280, 0, 0, 60400688, 115633260, 0, 0, 817175698, 1571588177, 0, 0, 11243980807, 21704569869, 0, 0, 156860869714
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,6
|
|
LINKS
|
|
|
FORMULA
|
a(n) equals the coefficient of x in Product_{k=1..n} (x^k + 1/x^k). - Paul D. Hanna, Jul 10 2018
|
|
MATHEMATICA
|
f[n_, s_] := f[n, s]=Which[n==0, If[s==0, 1, 0], Abs[s]>(n*(n+1))/2, 0, True, f[ n-1, s-n]+f[n-1, s+n]]; a[n_] := f[n, 1]
nmax = 50; d = {1}; a1 = {};
Do[
i = Ceiling[Length[d]/2] + 1;
AppendTo[a1, If[i > Length[d], 0, d[[i]]]];
d = PadLeft[d, Length[d] + 2 n] + PadRight[d, Length[d] + 2 n];
, {n, nmax}];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|