|
|
A357629
|
|
Half-alternating sum of the prime indices of n.
|
|
23
|
|
|
0, 1, 2, 2, 3, 3, 4, 1, 4, 4, 5, 0, 6, 5, 5, 0, 7, 1, 8, -1, 6, 6, 9, -1, 6, 7, 2, -2, 10, 0, 11, 1, 7, 8, 7, -2, 12, 9, 8, -2, 13, -1, 14, -3, 1, 10, 15, 2, 8, 1, 9, -4, 16, -1, 8, -3, 10, 11, 17, -3, 18, 12, 0, 2, 9, -2, 19, -5, 11, 0, 20, 1, 21, 13, 2, -6
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
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.
|
|
LINKS
|
|
|
EXAMPLE
|
The prime indices of 525 are {2,3,3,4} so a(525) = 2 + 3 - 3 - 4 = -2.
|
|
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]}];
Table[halfats[primeMS[n]], {n, 30}]
|
|
CROSSREFS
|
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|