|
|
A304712
|
|
Number of integer partitions of n whose parts are all equal or whose distinct parts are pairwise coprime.
|
|
12
|
|
|
1, 1, 2, 3, 5, 7, 10, 14, 19, 25, 32, 43, 54, 70, 86, 105, 130, 162, 196, 240, 286, 339, 405, 485, 573, 674, 790, 922, 1072, 1252, 1456, 1685, 1939, 2226, 2557, 2923, 3349, 3822, 4347, 4931, 5593, 6335, 7170, 8092, 9105, 10233, 11495, 12903, 14458, 16169, 18063
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Two parts are coprime if they have no common divisor greater than 1.
|
|
LINKS
|
|
|
EXAMPLE
|
The a(6) = 10 partitions whose parts are all equal or whose distinct parts are pairwise coprime are (6), (51), (411), (33), (321), (3111), (222), (2211), (21111), (111111).
|
|
MAPLE
|
g:= proc(n, i, s) `if`(n=0, 1, `if`(i<1, 0,
b(n, i, select(x-> x<=i, s))))
end:
b:= proc(n, i, s) option remember; g(n, i-1, s)+(f->
`if`(f intersect s={}, add(g(n-i*j, i-1, s union f)
, j=1..n/i), 0))(numtheory[factorset](i))
end:
a:= n-> g(n$2, {}):
|
|
MATHEMATICA
|
Table[Select[IntegerPartitions[n], Or[SameQ@@#, CoprimeQ@@Union[#]]&]//Length, {n, 20}]
(* Second program: *)
g[n_, i_, s_] := If[n == 0, 1, If[i < 1, 0, b[n, i, Select[s, # <= i &]]]];
b[n_, i_, s_] := b[n, i, s] = g[n, i - 1, s] + Function[f,
If[f ~Intersection~ s == {}, Sum[g[n - i*j, i - 1, s ~Union~ f],
{j, 1, n/i}], 0]][FactorInteger[i][[All, 1]]];
a[n_] := g[n, n, {}];
|
|
CROSSREFS
|
Cf. A000837, A007359, A018783, A051424, A056239, A078374, A101268, A289508, A289509, A298748, A300486, A302569, A302696, A302698, A302796, A302797, A304709, A304711.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|