OFFSET
1,3
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.
We define the reverse-weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(k-i) * i * y_{k-i+1}.
EXAMPLE
The partition with Heinz number 600 is (3,3,2,1,1,1), so a(600) = -1*1 + 2*1 - 3*1 + 4*2 - 5*3 + 6*3 = 9.
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
revaltwtsum[y_]:=Sum[(-1)^(Length[y]-k)*k*y[[-k]], {k, 1, Length[y]}];
Table[revaltwtsum[Reverse[prix[n]]], {n, 100}]
CROSSREFS
For multisets instead of partitions we have A363620.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 15 2023
STATUS
approved