OFFSET
1,2
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.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
EXAMPLE
The terms together with their prime indices begin:
1: {}
6: {1,2}
15: {2,3}
35: {3,4}
40: {1,1,1,3}
77: {4,5}
84: {1,1,2,4}
90: {1,2,2,3}
143: {5,6}
189: {2,2,2,4}
210: {1,2,3,4}
220: {1,1,3,5}
221: {6,7}
224: {1,1,1,1,1,4}
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]], {i, Length[y]}];
Select[Range[1000], Length[primeMS[#]]==2sats[primeMS[#]]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 16 2022
STATUS
approved