A357630 Skew-alternating sum of the prime indices of n.
0, 1, 2, 0, 3, -1, 4, -1, 0, -2, 5, -2, 6, -3, -1, 0, 7, -3, 8, -3, -2, -4, 9, 1, 0, -5, -2, -4, 10, -4, 11, 1, -3, -6, -1, 0, 12, -7, -4, 2, 13, -5, 14, -5, -3, -8, 15, 2, 0, -5, -5, -6, 16, -1, -2, 3, -6, -9, 17, 1, 18, -10, -4, 0, -3, -6, 19, -7, -7, -6, 20
Offset: 1
Keywords
Examples
The prime indices of 525 are {2,3,3,4} so a(525) = 2 - 3 - 3 + 4 = 0.
Crossrefs
The reverse version is A357634.
Programs
-
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}]
Comments