login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A278295
Number of n X n X n triangular 0..1 arrays with horizontal row sums nondecreasing from top to bottom.
1
1, 2, 7, 44, 507, 10868, 437908, 33421356, 4860115569, 1353020399536, 723897398723818, 746732196670027756, 1489203154941738419275, 5755222920272113115716592, 43188989125323730167491656884, 630465046596547626339663980200440
OFFSET
0,2
COMMENTS
With increasing sums we get A003422(n+1). - Alois P. Heinz, Dec 02 2016
With nondecreasing row elements we get A000108(n+1). - Alois P. Heinz, Dec 04 2016
LINKS
EXAMPLE
Some solutions for n=3:
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 1 1 1 0 0
MAPLE
noNSumR := proc(n, s)
binomial(n, s) ;
end proc:
A278295 := proc(n)
local a, mtot, p, pa, weakp, c, i ;
a := 0 ;
mtot := n*(n+1)/2 ;
for p from 0 to mtot do
for pa in combinat[partition](p+n) do
if nops(pa) = n then
weakp := [seq(op(i, pa)-1, i=1..nops(pa))] ;
c := 1 ;
for i from 1 to nops(weakp) do
c := c*noNSumR(i, op(i, weakp)) ;
end do:
a := a+c ;
end if;
end do:
end do:
a;
end proc: # R. J. Mathar, Dec 02 2016
# second Maple program:
b:= proc(n, i, k) option remember; `if`(i>n, 1,
add(binomial(i, j)*b(n, i+1, j), j=k..i))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..20); # Alois P. Heinz, Dec 02 2016
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[i>n, 1, Sum[Binomial[i, j]*b[n, i+1, j], {j, k, i}]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Feb 28 2017, after Alois P. Heinz *)
PROG
(PARI) rowsum(rowarr) = sum(x=1, #rowarr, rowarr[x])
is_validcombination(toprow, bottomrow) = if(rowsum(bottomrow) < rowsum(toprow), return(0), return(1))
nextrowcomb(rowarr) = my(k=#rowarr, i=0); while(rowarr[k]==1, rowarr[k]=0; i++; k--); while(rowarr[k]==0 && k > 1, k--); if(rowarr[k]==1, rowarr[k]=0; rowarr[k+1]=1; k=k+2; while(i > 0, rowarr[k]=1; k++; i--), for(x=k, k+i, rowarr[x]=1)); rowarr
terms(n) = my(toprows=[[0], [1]], bottomrow=[0, 0], validrows=[]); while(1, for(k=1, #toprows, if(is_validcombination(toprows[k], bottomrow), validrows=concat(validrows, [bottomrow]))); if(vecmin(bottomrow)==1, bottomrow=vector(#bottomrow+1); print1(#validrows, ", "); toprows=validrows; validrows=[], bottomrow=nextrowcomb(bottomrow)); if(#bottomrow==n+2, break))
terms(4) \\ print initial four terms
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Nov 30 2016
EXTENSIONS
4 more terms from R. J. Mathar, Dec 02 2016
a(0), a(10)-a(15) from Alois P. Heinz, Dec 02 2016
STATUS
approved