OFFSET
1,3
COMMENTS
We define the skew-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 prime indices of 525 are {2,3,3,4} so a(525) = 2 - 3 - 3 + 4 = 0.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]), {i, Length[f]}];
Table[skats[primeMS[n]], {n, 30}]
CROSSREFS
KEYWORD
sign
AUTHOR
Gus Wiseman, Oct 09 2022
STATUS
approved