OFFSET
1,2
COMMENTS
a(1) = 0 by convention, but could equally be taken to be 1 or 2.
Since only the primes p_j with nonzero exponents k_j in the factorization of n are considered in Sum (p_j + k_j), to the empty product (1) should correspond the empty sum (0). a(1) = 0 is thus the most natural choice. - Daniel Forgues, Apr 06 2010
Conjecture: for m > 4, by iterating the map m -> A008474(m) one always reaches 5 [tested up to m = 320000]. - Ivan N. Ianakiev, Nov 10 2014
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Daniel Tsai, A recurring pattern in natural numbers of a certain property, Integers (2021) Vol. 21, Article #A32.
Eric Weisstein's World of Mathematics, Prime Factorization
FORMULA
Additive with a(p^e) = p + e.
MAPLE
A008474 := proc(n) local e, j; e := ifactors(n)[2]:
add(e[j][1]+e[j][2], j=1..nops(e)) end:
seq (A008474(n), n=1..60);
# Peter Luschny, Jan 17 2011
MATHEMATICA
A008474[n_]:=Plus@@Flatten[FactorInteger[n]]; Table[A008474[n], {n, 200}] (* Zak Seidov, May 23 2005 *)
PROG
(Haskell)
a008474 n = sum $ zipWith (+) (a027748_row n) (a124010_row n)
-- Reinhard Zumkeller, Feb 11 2012, Aug 27 2011
(PARI) {for(k=1, 79,
M=factor(k); smt =0;
for(i=1, matsize(M)[1], for(j=1, matsize(M)[2], smt=smt+M[i, j]));
print1(smt, ", "))} \\\ Douglas Latimer, Apr 27 2012
(PARI) a(n)=my(f=factor(n)); sum(i=1, #f~, f[i, 1]+f[i, 2]) \\ Charles R Greathouse IV, Jun 03 2015
(Python)
from sympy import factorint
def a(n): return 0 if n == 1 else sum(p+k for p, k in factorint(n).items())
print([a(n) for n in range(1, 79)]) # Michael S. Branicky, Mar 28 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Zak Seidov, May 23 2005
STATUS
approved