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.
%I A187988 #24 Sep 18 2024 08:01:47 %S A187988 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, %T A187988 0,7,13,39,111,260,632,1452,0,8,15,49,144,355,912,2199,5040,0,9,17,60, %U A187988 181,467,1257,3158,7593,17829,0,10,19,72,222,597,1673,4357,10920,26706,62870 %N 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. %C A187988 Table starts %C A187988 .....0.....0.....0.....0.....0.....0.....0.....0....0....0...0...0..0..0.0 %C A187988 .....1.....2.....3.....4.....5.....6.....7.....8....9...10..11..12.13.14 %C A187988 .....3.....5.....7.....9....11....13....15....17...19...21..23..25.27 %C A187988 .....9....15....22....30....39....49....60....72...85...99.114.130 %C A187988 ....36....57....82...111...144...181...222...267..316..369.426 %C A187988 ...117...181...260...355...467...597...746...915.1105.1317 %C A187988 ...411...632...912..1257..1673..2166..2742..3407.4167 %C A187988 ..1452..2199..3158..4357..5825..7592..9689.12148 %C A187988 ..5040..7593.10920.15146.20404.26835.34588 %C A187988 .17829.26706.38385.53379.72246.95590 %H A187988 R. J. Mathar, <a href="/A187988/b187988.txt">Table of n, a(n) for n = 1..187</a> augmenting an earlier file with 117 entries by R. H. Hardin. %H A187988 R. J. Mathar, <a href="/A187988/a187988.pdf">Background on the recurrent Maple program for the linear diophantine equation</a> %e A187988 Some solutions for n=5 k=3 %e A187988 .-3...-6...-5...-3...-3...-6...-4...-4...-1...-4...-2...-4...-4...-2...-3...-5 %e A187988 .-3...-3...-5...-1...-3...-5...-1...-2...-1...-4...-2...-2...-4...-1....1...-1 %e A187988 .-2...-3...-2....1...-3...-5....0...-2....0...-4...-1....2...-3....1....1....1 %e A187988 ..2....4....2....2...-3....6....0....3....0...-4....1....3....3....1....1....4 %e A187988 ..4....6....6....2....5....6....4....4....1....6....3....3....5....1....1....4 %p A187988 AatE := proc(n,nminusfE,E) %p A187988 option remember ; %p A187988 local a,fEminus, fEplus,f0,resn ; %p A187988 if E = 0 then %p A187988 if n =0 then %p A187988 1; %p A187988 else %p A187988 0; %p A187988 end if; %p A187988 else %p A187988 a :=0 ; %p A187988 for fEminus from 0 to nminusfE do %p A187988 for fEplus from 0 to nminusfE-fEminus do %p A187988 f0 := nminusfE-fEminus-fEplus ; %p A187988 resn := n-(2^E+1)*fEminus+(2^E-1)*fEplus ; %p A187988 if abs (resn) <= (1+2^(E-1))*f0 then %p A187988 a := a+procname(resn,f0,E-1) ; %p A187988 end if; %p A187988 end do: %p A187988 end do: %p A187988 a ; %p A187988 end if; %p A187988 end proc: %p A187988 A187988 := proc(n,k) %p A187988 AatE(n,n,n+k-2) ; %p A187988 end proc: %p A187988 seq(seq( A187988(n, d-n), n=1..d-1), d=2..15) ; # _R. J. Mathar_, May 12 2023 %t A187988 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]]; %t A187988 A187988[n_, k_] := AatE[n, n, n+k-2]; %t A187988 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_ *) %Y A187988 Row n=4 is A055999(k+1). A187989 (n=5), A187990 (n=6), A187991 (n=7), A187992 (n=8), A187979 (k=n), A187980 (k=1), A187981 (k=2), A187982 (k=3), A187983 (k=4), A187984 (k=5), A187985 (k=6). %K A187988 nonn,tabl %O A187988 1,5 %A A187988 _R. H. Hardin_, Mar 18 2011