[go: up one dir, main page]

login
A321016
Triangle read by rows: number of partitions of n into distinct and consecutive parts with largest part k (n >= 1, 1 <= k <= n)..
0
1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1
OFFSET
1
COMMENTS
Suggested by A321440.
EXAMPLE
Triangle begins:
[1]
[0, 1]
[0, 1, 1]
[0, 0, 0, 1]
[0, 0, 1, 0, 1]
[0, 0, 1, 0, 0, 1]
[0, 0, 0, 1, 0, 0, 1]
[0, 0, 0, 0, 0, 0, 0, 1]
[0, 0, 0, 1, 1, 0, 0, 0, 1]
[0, 0, 0, 1, 0, 0, 0, 0, 0, 1]
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1]
[0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1]
[0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1]
...
MAPLE
with(combinat);
f2:=proc(n) local i, j, p, t0, t1, t2;
t0:=Array(1..n, 0); t1:=partition(n); p:=numbpart(n);
for i from 1 to p do t2:=t1[i];
if nops(convert(t2, set))=nops(t2) then
# now have a partition t2 of n into distinct parts
gd:=1;
if nops(t2)>1 then
for j from 1 to nops(t2)-1 do if t2[j+1]-t2[j]>1 then gd:=-1; fi;
od; fi;
# now have a partition t2 of n into distinct consecutive parts
if gd=1 then t0[t2[-1]]:=t0[t2[-1]]+1; fi;
fi;
od:
[seq(t0[j], j=1..n)];
end proc;
for n from 1 to 15 do lprint(f2(n)) od:
CROSSREFS
Row sums are A001227.
Cf. A321440.
Sequence in context: A077052 A133566 A185907 * A077051 A115955 A106344
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Nov 09 2018
STATUS
approved