OFFSET
1,4
COMMENTS
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..65536
EXAMPLE
The a(24) = 6 partitions coarser than or equal to (2111) are (2111), (311), (221), (32), (41), (5), with Heinz numbers 24, 20, 18, 15, 14, 11.
MAPLE
g:= l-> `if`(l=[], {[]}, (t-> map(sort, map(x->
[seq(subsop(i=x[i]+t, x), i=1..nops(x)),
[x[], t]][], g(subsop(-1=[][], l)))))(l[-1])):
a:= n-> nops(g(map(i-> numtheory[pi](i[1])$i[2], ifactors(n)[2]))):
seq(a(n), n=1..100); # Alois P. Heinz, Jul 22 2018
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
sps[{}]:={{}}; sps[set:{i_, ___}]:=Join@@Function[s, Prepend[#, s]&/@sps[Complement[set, s]]]/@Cases[Subsets[set], {i, ___}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
ptncaps[ptn_]:=Union[Sort/@Apply[Plus, mps[ptn], {2}]];
Table[Length[ptncaps[primeMS[n]]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 22 2018
STATUS
approved