OFFSET
1,9
COMMENTS
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
The augmented differences aug(y) of an integer partition y of length k are given by aug(y)_i = y_i - y_{i + 1} + 1 if i < k and aug(y)_k = y_k. For example, aug(6,5,5,3,3,3) = (2,1,3,1,1,3).
LINKS
EXAMPLE
Repeatedly applying A325351 starting with 78 gives 78 -> 66 -> 42 -> 30 -> 18 -> 12, and 12 is a fixed point, so a(78) = 6.
MATHEMATICA
primeptn[n_]:=If[n==1, {}, Reverse[Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]]];
aug[y_]:=Table[If[i<Length[y], y[[i]]-y[[i+1]]+1, y[[i]]], {i, Length[y]}];
Table[Length[FixedPointList[Times@@Prime/@aug[primeptn[#]]&, n]]-1, {n, 50}]
PROG
(PARI)
augdiffs(n) = { my(diffs=List([]), f=factor(n), prevpi, pi=0, i=#f~); while(i, prevpi=pi; pi = primepi(f[i, 1]); if(prevpi, listput(diffs, 1+(prevpi-pi))); if(f[i, 2]>1, f[i, 2]--, i--)); if(pi, listput(diffs, pi)); Vec(diffs); };
A325351(n) = factorback(apply(prime, augdiffs(n)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Apr 23 2019
EXTENSIONS
More terms from Antti Karttunen, Nov 16 2019
STATUS
approved