OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
EXAMPLE
a(6) counts these 5 partitions : 51, 42, 3111, 22111, 21111.
MAPLE
b:= proc(n, i, d) option remember; `if`(2*min(i, n)<d+1, 0,
`if`(irem(n, i)=0 and 2*i=d+1, 1, b(n, i-1, d)+
add(b(n-i*j, i-1, d+1), j=1..n/i)))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..60); # Alois P. Heinz, Apr 02 2014
MATHEMATICA
z = 60; d[p_] := d[p] = Length[DeleteDuplicates[p]]; Table[Count[ IntegerPartitions[n], p_ /; d[p] == 2 Min[p]], {n, 0, z}] (* A239953 *)
(* Second program: *)
b[n_, i_, d_] := b[n, i, d] = If[2*Min[i, n] < d + 1, 0,
If[Mod[n, i] == 0 && 2*i == d + 1, 1, b[n, i - 1, d] +
Sum[b[n - i*j, i - 1, d + 1], {j, 1, n/i}]]];
a[n_] := b[n, n, 0];
a /@ Range[0, 60] (* Jean-François Alcover, May 31 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 30 2014
STATUS
approved