A325036 Difference between product and sum of prime indices of n.
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
Keywords
Examples
The prime indices of 45 are {2,2,3}, with product 12 and sum 7, so a(45) = 5.
Links
Crossrefs
Programs
-
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 *)
-
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
Formula
Extensions
Data section extended up to a(93) by Antti Karttunen, May 08 2022
Comments