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.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The partial sums of first differences of a sequence telescope to "rest minus first", leading to the formula.
FORMULA
If n = Product_{i=1..k} prime(x_i) then a(n) = Product_{i=1..k-1} prime(x_k-x_{k-i}+1).
EXAMPLE
The prime indices of 36 are (1,1,2,2), differences (0,1,0), reversed (0,1,0), partial sums (0,1,1), plus one (1,2,2), Heinz number 18, so a(36) = 18.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
osq[q_]:=1+Accumulate[Reverse[Differences[q]]];
Table[Times@@Prime/@osq[primeMS[n]], {n, 20}]
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 23 2022
STATUS
approved