|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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.
|
|
LINKS
|
|
|
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
|
For multisets instead of partitions we have A363619.
A359677 gives zero-based weighted sum of prime indices, reverse A359674.
A363626 counts compositions with reverse-weighted alternating sum 0.
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|