|
|
A240861
|
|
Number of partitions p of n into distinct parts not including the number of parts.
|
|
20
|
|
|
1, 0, 1, 1, 2, 2, 2, 4, 4, 5, 6, 9, 10, 12, 14, 18, 22, 26, 30, 36, 42, 51, 60, 70, 81, 94, 110, 128, 148, 172, 198, 226, 260, 298, 342, 390, 446, 508, 577, 654, 742, 840, 951, 1074, 1212, 1366, 1538, 1728, 1940, 2176, 2440, 2732, 3056, 3416, 3814, 4254
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(10) counts these 6 partitions: {10}, {9,1}, {7,3}, {7,2,1}, {6,4}, {5,4,1}.
|
|
MAPLE
|
g:= proc(n) option remember; `if`(n=0, 1, add(g(n-j)*add(
`if`(d::odd, d, 0), d=numtheory[divisors](j)), j=1..n)/n)
end:
b:= proc(n, i, p) option remember; `if`(i*(i+1)/2<n, 0,
`if`(n=0, [x^p, 0], (f-> [add(coeff(f[1], x, j)*x^j
, j=i+1..degree(f[1])), f[2]+coeff(f[1], x, i)])(
b(n-i, min(n-i, i-1), p+1))+b(n, i-1, p)))
end:
a:= n-> g(n)-b(n$2, 0)[2]:
|
|
MATHEMATICA
|
z = 40; f[n_] := f[n] = Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &];
Table[Count[f[n], p_ /; MemberQ[p, Length[p]]], {n, 0, z}] (* A240855 *)
Table[Count[f[n], p_ /; !MemberQ[p, Length[p]]], {n, 0, z}] (* A240861 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|