login
A241391
Number of partitions p of n such that the number of distinct parts is a part or max(p) - min(p) is a part.
5
0, 1, 1, 2, 2, 4, 5, 7, 10, 15, 20, 25, 40, 45, 68, 84, 115, 141, 195, 235, 317, 386, 504, 617, 788, 970, 1224, 1493, 1862, 2275, 2802, 3401, 4191, 5044, 6144, 7423, 8962, 10758, 12966, 15469, 18586, 22114, 26376, 31300, 37285, 43986, 52182, 61501, 72647
OFFSET
0,4
FORMULA
a(n) + A241390(n) = A000041(n) for n >= 0.
EXAMPLE
a(6) counts these 5 partitions: 42, 321, 2211, 21111, 111111.
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