cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, following a suggestion by J. H. Conway, Aug 27 2001

Keywords

Crossrefs

Programs

  • 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 *)

Formula

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

Extensions

More terms from Dean Hickerson and Vladeta Jovovic, Aug 28 2001