OFFSET
1,1
COMMENTS
We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...
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
The terms together with their prime indices begin:
2: {1}
8: {1,1,1}
24: {1,1,1,2}
32: {1,1,1,1,1}
54: {1,2,2,2}
128: {1,1,1,1,1,1,1}
135: {2,2,2,3}
162: {1,2,2,2,2}
375: {2,3,3,3}
384: {1,1,1,1,1,1,1,2}
512: {1,1,1,1,1,1,1,1,1}
648: {1,1,1,2,2,2,2}
864: {1,1,1,1,1,2,2,2}
875: {3,3,3,4}
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]), {i, Length[f]}];
Select[Range[1000], halfats[Reverse[primeMS[#]]]==1&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 28 2022
STATUS
approved