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.

A187979 Number of nondecreasing arrangements of n numbers x(i) in -(2n-2)..(2n-2) with the sum of sign(x(i))*2^|x(i)| zero.

Original entry on oeis.org

0, 2, 7, 30, 144, 597, 2742, 12148, 54696, 247482, 1120330, 5099759, 23249035, 106285418, 486878283, 2234333944, 10271022863, 47283130811, 217962771486, 1005958652638, 4647869260260, 21496269109425, 99510938004788, 461047642206301, 2137763442289891, 9919444208575431, 46058149007746511, 213991712768042425, 994811217776431456, 4627232005483362687
Offset: 1

Views

Author

R. H. Hardin, Mar 18 2011

Keywords

Examples

			All solutions for n=3
.-1...-3...-4...-3...-1...-2...-2
.-1....2....3...-3....0....1...-2
..2....2....3....4....0....1....3
		

Crossrefs

Main diagonal of A187988.

Programs

  • Mathematica
    AatE[n_, nminusfE_, E_] := AatE[n, nminusfE, E] = Module[{a, fEminus, fEplus, f0, resn}, If[E == 0, If[n == 0, 1, 0], a = 0; For[fEminus = 0, fEminus <= nminusfE, fEminus++, For[fEplus = 0, fEplus <= nminusfE - fEminus, fEplus++, f0 = nminusfE - fEminus - fEplus; resn = n - (2^E + 1)*fEminus + (2^E - 1)*fEplus; If[Abs[resn] <= (1 + 2^(E - 1))*f0, a = a + AatE[resn, f0, E - 1]]]]; a]];
    a[n_] := a[n] = AatE[n, n, 2 n - 2];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 30}] (* Jean-François Alcover, Sep 18 2024, after R. J. Mathar in A187988 *)

Extensions

a(10)-a(30) from Jean-François Alcover, Sep 18 2024