login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
0,6
LINKS
Ray Chandler, Table of n, a(n) for n = 0..3340 (terms < 10^1000; first 101 terms from T. D. Noe)
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}];
a1 (* Ray Chandler, Mar 14 2014 *)
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
N. J. A. Sloane, following a suggestion by J. H. Conway, Aug 27 2001
EXTENSIONS
More terms from Dean Hickerson and Vladeta Jovovic, Aug 28 2001
STATUS
approved