OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
EXAMPLE
For n=6 the partitions counted are 6, 51, 42, 411, 321, 3111
The a(9) = 17 such partitions of 9 are:
01: [ 3 2 2 1 1 ]
02: [ 4 2 1 1 1 ]
03: [ 4 2 2 1 ]
04: [ 4 3 1 1 ]
05: [ 4 3 2 ]
06: [ 5 1 1 1 1 ]
07: [ 5 2 1 1 ]
08: [ 5 2 2 ]
09: [ 5 3 1 ]
10: [ 5 4 ]
11: [ 6 1 1 1 ]
12: [ 6 2 1 ]
13: [ 6 3 ]
14: [ 7 1 1 ]
15: [ 7 2 ]
16: [ 8 1 ]
17: [ 9 ]
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, 1,
`if`(i<1, 0, b(n, i-1, `if`(t=1, 1, t+1))+add(
b(n-i*j, i-1, t+1), j=1..min(t, n/i))))
end:
a:= n-> b(n$2, 1):
seq(a(n), n=0..60); # Alois P. Heinz, Jul 29 2017
MATHEMATICA
nend=20;
For[n=1, n<=nend, n++,
count[n]=0;
Ip=IntegerPartitions[n];
For[i=1, i<=Length[Ip], i++,
m=Max[Ip[[i]]];
condition=True;
Tip=Tally[Ip[[i]]];
For[j=1, j<=Length[Tip], j++,
condition=condition&&(Tip[[j]][[2]]<= m-Tip[[j]][[1]]+1)];
If[condition, count[n]++(*; Print[Ip[[i]]]*)]];
]
Table[count[i], {i, 1, nend}]
(* Second program: *)
b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < 1, 0,
b[n, i - 1, If[t == 1, 1, t + 1]] + Sum[
b[n - i*j, i - 1, t + 1], {j, 1, Min[t, n/i]}]]];
a[n_] := b[n, n, 1];
a /@ Range[0, 60] (* Jean-François Alcover, Jun 05 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David S. Newman, Jul 03 2014
EXTENSIONS
More terms from Joerg Arndt, Jul 03 2014
STATUS
approved