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 - ...
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
EXAMPLE
The terms together with their prime indices begin:
2: {1}
8: {1,1,1}
18: {1,2,2}
32: {1,1,1,1,1}
45: {2,2,3}
50: {1,3,3}
72: {1,1,1,2,2}
98: {1,4,4}
105: {2,3,4}
128: {1,1,1,1,1,1,1}
162: {1,2,2,2,2}
180: {1,1,2,2,3}
200: {1,1,1,3,3}
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[primeMS[#]]==1&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 28 2022
STATUS
approved