Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A325036
Difference between product and sum of prime indices of n.
9
1, 0, 0, -1, 0, -1, 0, -2, 0, -1, 0, -2, 0, -1, 1, -3, 0, -1, 0, -2, 2, -1, 0, -3, 3, -1, 2, -2, 0, 0, 0, -4, 3, -1, 5, -2, 0, -1, 4, -3, 0, 1, 0, -2, 5, -1, 0, -4, 8, 2, 5, -2, 0, 1, 7, -3, 6, -1, 0, -1, 0, -1, 8, -5, 9, 2, 0, -2, 7, 4, 0, -3, 0, -1, 10, -2, 11, 3, 0, -4, 8, -1, 0, 0, 11, -1, 8, -3, 0, 4, 14, -2, 9
OFFSET
1,8
COMMENTS
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.
FORMULA
a(n) = A003963(n) - A056239(n).
For all n >= 1, a(A325040(n)) = a(A122111(A325040(n))). - Antti Karttunen, May 08 2022
EXAMPLE
The prime indices of 45 are {2,2,3}, with product 12 and sum 7, so a(45) = 5.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Times@@primeMS[n]-Total[primeMS[n]], {n, 100}]
dps[n_]:=Module[{pi=Flatten[Table[PrimePi[#[[1]]], #[[2]]]&/@FactorInteger[n]]}, Times@@pi-Total[pi]]; Join[{1}, Array[dps, 100, 2]] (* Harvey P. Dale, May 26 2023 *)
PROG
(PARI)
A003963(n) = { n=factor(n); n[, 1]=apply(primepi, n[, 1]); factorback(n) }; \\ From A003963
A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i, 2] * primepi(f[i, 1]))); };
A325036(n) = (A003963(n) - A056239(n)); \\ Antti Karttunen, May 08 2022
CROSSREFS
Positions of zeros are A301987. Positions of ones are A325041. Positions of negative ones are A325042.
Sequence in context: A359269 A091603 A370884 * A194942 A129688 A356678
KEYWORD
sign
AUTHOR
Gus Wiseman, Mar 25 2019
EXTENSIONS
Data section extended up to a(93) by Antti Karttunen, May 08 2022
STATUS
approved