login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A063866 Number of solutions to +- 1 +- 2 +- 3 +- ... +- n = 1. 18

%I #27 Nov 02 2023 05:29:40

%S 0,1,1,0,0,3,5,0,0,23,40,0,0,221,397,0,0,2410,4441,0,0,28460,53222,0,

%T 0,353743,668273,0,0,4559828,8679280,0,0,60400688,115633260,0,0,

%U 817175698,1571588177,0,0,11243980807,21704569869,0,0,156860869714

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

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

%F a(n) equals the coefficient of x in Product_{k=1..n} (x^k + 1/x^k). - _Paul D. Hanna_, Jul 10 2018

%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, 1]

%t nmax = 50; d = {1}; a1 = {};

%t Do[

%t i = Ceiling[Length[d]/2] + 1;

%t AppendTo[a1, If[i > Length[d], 0, d[[i]]]];

%t d = PadLeft[d, Length[d] + 2 n] + PadRight[d, Length[d] + 2 n];

%t , {n, nmax}];

%t a1 (* _Ray Chandler_, Mar 14 2014 *)

%Y Cf. A025591, A063865, A063867.

%K nonn,easy,nice

%O 0,6

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 22:27 EDT 2024. Contains 375144 sequences. (Running on oeis4.)