A352167 a(n) is the sum of the prime factors of n (with multiplicity) that are less than n.
0, 0, 0, 4, 0, 5, 0, 6, 6, 7, 0, 7, 0, 9, 8, 8, 0, 8, 0, 9, 10, 13, 0, 9, 10, 15, 9, 11, 0, 10, 0, 10, 14, 19, 12, 10, 0, 21, 16, 11, 0, 12, 0, 15, 11, 25, 0, 11, 14, 12, 20, 17, 0, 11, 16, 13, 22, 31, 0, 12, 0, 33, 13, 12, 18, 16, 0, 21, 26, 14, 0, 12, 0, 39, 13, 23, 18, 18, 0, 13
Offset: 1
Keywords
Links
- Eric Weisstein's World of Mathematics, Sum of Prime Factors
Programs
-
Mathematica
a[n_] := If[n == 1 || PrimeQ[n], 0, Plus @@ Times @@@ FactorInteger@n]; Table[a[n], {n, 80}]
-
PARI
a(n) = if (isprime(n), 0, my(f=factor(n)); sum(k=1, #f~, f[k,1]*f[k,2])); \\ Michel Marcus, Mar 07 2022