A187988 T(n,k) = number of nondecreasing arrangements of n numbers x(i) in -(n+k-2)..(n+k-2) with the sum of sign(x(i))*2^|x(i)| zero.
0, 0, 1, 0, 2, 3, 0, 3, 5, 9, 0, 4, 7, 15, 36, 0, 5, 9, 22, 57, 117, 0, 6, 11, 30, 82, 181, 411, 0, 7, 13, 39, 111, 260, 632, 1452, 0, 8, 15, 49, 144, 355, 912, 2199, 5040, 0, 9, 17, 60, 181, 467, 1257, 3158, 7593, 17829, 0, 10, 19, 72, 222, 597, 1673, 4357, 10920, 26706, 62870
Offset: 1
Examples
Some solutions for n=5 k=3 .-3...-6...-5...-3...-3...-6...-4...-4...-1...-4...-2...-4...-4...-2...-3...-5 .-3...-3...-5...-1...-3...-5...-1...-2...-1...-4...-2...-2...-4...-1....1...-1 .-2...-3...-2....1...-3...-5....0...-2....0...-4...-1....2...-3....1....1....1 ..2....4....2....2...-3....6....0....3....0...-4....1....3....3....1....1....4 ..4....6....6....2....5....6....4....4....1....6....3....3....5....1....1....4
Links
- R. J. Mathar, Table of n, a(n) for n = 1..187 augmenting an earlier file with 117 entries by R. H. Hardin.
- R. J. Mathar, Background on the recurrent Maple program for the linear diophantine equation
Crossrefs
Programs
-
Maple
AatE := proc(n,nminusfE,E) option remember ; local a,fEminus, fEplus,f0,resn ; if E = 0 then if n =0 then 1; else 0; end if; else a :=0 ; for fEminus from 0 to nminusfE do for fEplus from 0 to nminusfE-fEminus do f0 := nminusfE-fEminus-fEplus ; resn := n-(2^E+1)*fEminus+(2^E-1)*fEplus ; if abs (resn) <= (1+2^(E-1))*f0 then a := a+procname(resn,f0,E-1) ; end if; end do: end do: a ; end if; end proc: A187988 := proc(n,k) AatE(n,n,n+k-2) ; end proc: seq(seq( A187988(n, d-n), n=1..d-1), d=2..15) ; # R. J. Mathar, May 12 2023
-
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]]; A187988[n_, k_] := AatE[n, n, n+k-2]; Table[Table[ A187988[n, d-n], {n, 1, d-1}], {d, 2, 15}] // Flatten (* Jean-François Alcover, Sep 18 2024, after R. J. Mathar *)
Comments