OFFSET
1,4
COMMENTS
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
EXAMPLE
The a(n) partitions for n = 1, 4, 8, 9, 12, 16, 20, 24:
() (1) (1) (4) (2) (1) (3) (2)
(2) (2) (22) (3) (2) (4) (3)
(11) (3) (4) (3) (5) (4)
(11) (21) (4) (6) (5)
(21) (22) (11) (31) (6)
(111) (31) (21) (32) (21)
(211) (22) (41) (22)
(31) (311) (31)
(111) (32)
(211) (41)
(1111) (211)
(221)
(311)
(2111)
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
ReplaceListRepeated[forms_, rerules_]:=Union[Flatten[FixedPointList[Function[pre, Union[Flatten[ReplaceList[#, rerules]&/@pre, 1]]], forms], 1]];
Table[Length[ReplaceListRepeated[{primeMS[n]}, {{foe___, x_, mie___, y_, afe___}:>Sort[Append[{foe, mie, afe}, x+y]], {foe___, x_, mie___, y_, afe___}:>Sort[Append[{foe, mie, afe}, x*y]]}]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 17 2022
STATUS
approved