login
Number of solutions to +- 1 +- 2 +- 3 +- ... +- n = 0 or +- 1.
8

%I #31 Nov 02 2023 12:32:15

%S 1,2,2,2,2,6,10,8,14,46,80,70,124,442,794,722,1314,4820,8882,8220,

%T 15272,56920,106444,99820,187692,707486,1336546,1265204,2399784,

%U 9119656,17358560,16547220,31592878,120801376,231266520,221653776

%N Number of solutions to +- 1 +- 2 +- 3 +- ... +- n = 0 or +- 1.

%H Ray Chandler, <a href="/A063867/b063867.txt">Table of n, a(n) for n = 0..3339</a> (terms < 10^1000; first 101 terms from T. D. Noe)

%H Steven R. Finch, <a href="/A000980/a000980.pdf">Signum equations and extremal coefficients</a>, February 7, 2009. [Cached copy, with permission of the author]

%F a(n) = A063865(n) + 2*A063866(n).

%t 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, 0]+2f[n, 1]

%Y Cf. A025591, A063865, A063866.

%K nonn,easy,nice

%O 0,2

%A _N. J. A. Sloane_, following a suggestion by _J. H. Conway_, Aug 27 2001

%E More terms from _Dean Hickerson_ and _Vladeta Jovovic_, Aug 28 2001