login
A363624
Weighted alternating sum of the integer partition with Heinz number n.
8
0, 1, 2, -1, 3, 0, 4, 2, -2, 1, 5, 3, 6, 2, -1, -2, 7, 1, 8, 4, 0, 3, 9, -1, -3, 4, 4, 5, 10, 2, 11, 3, 1, 5, -2, -3, 12, 6, 2, 0, 13, 3, 14, 6, 5, 7, 15, 4, -4, 0, 3, 7, 16, 0, -1, 1, 4, 8, 17, -2, 18, 9, 6, -3, 0, 4, 19, 8, 5, 1, 20, 2, 21, 10, 3, 9, -3, 5
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 weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(i - 1) * i * y_i.
EXAMPLE
The partition with Heinz number 600 is (3,3,2,1,1,1), with weighted alternating sum 1*3 - 2*3 + 3*2 - 4*1 + 5*1 - 6*1 = -2, so a(600) = -2.
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
altwtsum[y_]:=Sum[(-1)^(k-1)*k*y[[k]], {k, 1, Length[y]}];
Table[altwtsum[Reverse[prix[n]]], {n, 100}]
CROSSREFS
The non-alternating version is A318283, reverse A304818.
The unweighted version is A344616, reverse A316524.
For multisets instead of partitions we have A363619.
Positions of zeros are A363621, counted by A363532.
The triangle for this rank statistic is A363622, reverse A363623.
The reverse version is A363625, for multisets A363620.
A055396 gives minimum prime index, maximum A061395.
A112798 lists prime indices, length A001222, sum A056239.
A264034 counts partitions by weighted sum, reverse A358194.
A320387 counts multisets by weighted sum, reverse A007294.
A359677 gives zero-based weighted sum of prime indices, reverse A359674.
A363626 counts compositions with reverse-weighted alternating sum 0.
Sequence in context: A359336 A062778 A363620 * A108202 A025480 A088002
KEYWORD
sign
AUTHOR
Gus Wiseman, Jun 13 2023
STATUS
approved