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.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Additive: a(m*n) = a(m) + a(n) if gcd(m,n) = 1.
Additive with a(p^e) = (e-1)*PrimePi(p). - Amiram Eldar, Jan 17 2026
EXAMPLE
The prime indices of 96 are {1,1,1,1,1,2}, with sum 7, and with distinct prime indices {1,2}, with sum 3, so a(96) = 7 - 3 = 4.
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Total[prix[n]]-Total[Union[prix[n]]], {n, 100}]
PROG
(PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, (f[i, 2]-1) * primepi(f[i, 1])); } \\ Amiram Eldar, Jan 17 2026
CROSSREFS
For length instead of sum we have A046660.
Positions of 1's are A081770.
A multiplicative version is A290106.
Counting partitions by this statistic gives A364916.
Dominates A374248.
For prime multiplicities instead of prime indices we have A380958.
For product instead of sum we have A380986.
KEYWORD
nonn,easy
AUTHOR
Gus Wiseman, Feb 11 2025
STATUS
approved
