login
A241387
Number of partitions p of n such that the number of distinct parts is a part and max(p) - min(p) is a part.
5
0, 0, 0, 1, 1, 2, 4, 4, 7, 9, 13, 14, 22, 26, 36, 40, 54, 66, 85, 99, 127, 148, 187, 221, 277, 323, 394, 464, 565, 665, 805, 939, 1126, 1320, 1573, 1832, 2183, 2541, 3004, 3504, 4111, 4769, 5614, 6498, 7599, 8803, 10256, 11853, 13783, 15895, 18429, 21250
OFFSET
0,6
FORMULA
a(n) + A241388(n) + A241389(n) = A241391(n) for n >= 0.
EXAMPLE
a(9) counts these 9 partitions: 432, 4311, 3321, 32211, 321111, 222211, 222111, 221111, 21111111.
MATHEMATICA
z = 40; f[n_] := f[n] = IntegerPartitions[n]; d[p_] := d[p] = Length[DeleteDuplicates[p]];
Table[Count[f[n], p_ /; MemberQ[p, d[p]] && MemberQ[p, Max[p] - Min[p]]], {n, 0, z}] (* A241387 *)
Table[Count[f[n], p_ /; ! MemberQ[p, d[p]] && MemberQ[p, Max[p] - Min[p]]], {n, 0, z}] (* A241388 *)
Table[Count[f[n], p_ /; MemberQ[p, d[p]] && ! MemberQ[p, Max[p] - Min[p]]], {n, 0, z}] (* A241389 *)
Table[Count[f[n], p_ /; ! MemberQ[p, d[p]] && ! MemberQ[p, Max[p] - Min[p]]], {n, 0, z}] (* A241390 *)
Table[Count[f[n], p_ /; MemberQ[p, d[p]] || MemberQ[p, Max[p] - Min[p]]], {n, 0, z}] (* A241391 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 21 2014
STATUS
approved