OFFSET
0,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.
EXAMPLE
First positions n such that a(n) = 4, 3, 2, 1, 0, -1, -2, -3, -4, together with their prime indices, are:
7: (4)
5: (3)
3: (2)
2: (1)
1: ()
4: (1,1)
9: (2,2)
25: (3,3)
49: (4,4)
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
conj[y_]:=If[Length[y]==0, y, Table[Length[Select[y, #>=k&]], {k, 1, Max[y]}]];
Table[Count[conj[primeMS[n]], _?OddQ]-Count[conj[primeMS[n]], _?EvenQ], {n, 1, 50}]
CROSSREFS
KEYWORD
sign
AUTHOR
Gus Wiseman, Jan 28 2022
STATUS
approved