OFFSET
1,2
COMMENTS
Sometimes called sopf(n).
Sum of primes dividing n (without repetition) (compare A001414).
Equals A051731 * A061397 = inverse Mobius transform of [0, 2, 3, 0, 5, 0, 7, ...]. - Gary W. Adamson, Feb 14 2008
Equals row sums of triangle A143535. - Gary W. Adamson, Aug 23 2008
a(n) = n if and only if n is prime. - Daniel Forgues, Mar 24 2009
a(n) = n is a new record if and only if n is prime. - Zak Seidov, Jun 27 2009
a(A006899(n)) <= 3; a(A003586(n)) = 5; a(A033846(n)) = 7; a(A033849(n)) = 8; a(A033847(n)) = 9; a(A033850(n)) = 10; a(A143207(n)) = 10. - Reinhard Zumkeller, Jun 28 2011
If n is the product of twin primes (A037074), a(n) = 2*sqrt(n+1) = sqrt(4n+4). - Wesley Ivan Hurt, Sep 07 2013
From Wilf A. Wilson, Jul 21 2017: (Start)
a(n) + 2, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing mappings on a set with n elements.
a(n) + 3, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing partial mappings on a set with n elements.
(End)
The smallest m such that a(m) = n, or 0 if no such number m exists is A064502(n). The only integers that are not in the sequence are 1, 4 and 6. - Bernard Schott, Feb 07 2022
LINKS
Daniel Forgues, Table of n, a(n) for n = 1..100000 (first 10000 terms from Franklin T. Adams-Watters)
Johann Bartel, R. K. Bhaduri, Matthias Brack, and M. V. N. Murthy, On the asymptotic prime partitions of integers, arXiv:1609.06497 [math-ph], 2017.
James East, Jitender Kumar, James D. Mitchell, and Wilf A. Wilson, Maximal subsemigroups of finite transformation and partition monoids, arXiv:1706.04967 [math.GR], 2017. [Wilf A. Wilson, Jul 21 2017]
FORMULA
Let n = Product_j prime(j)^k(j) where k(j) >= 1, then a(n) = Sum_j prime(j).
Additive with a(p^e) = p.
G.f.: Sum_{k >= 1} prime(k)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
L.g.f.: -log(Product_{k>=1} (1 - x^prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 06 2017
Dirichlet g.f.: primezeta(s-1)*zeta(s). - Benedict W. J. Irwin, Jul 11 2018
a(n) = Sum_{p|n, p prime} p. - Wesley Ivan Hurt, Feb 04 2022
From Bernard Schott, Feb 07 2022: (Start)
For n > 0: a(A001020(n)) = 11, a(A001022(n)) = 13, a(A001026(n)) = 17, a(A001029(n)) = 19, a(A009967(n)) = 23, a(A009973(n)) = 29, a(A009975(n)) = 31, a(A009981(n)) = 37, a(A009985(n)) = 41, a(A009987(n)) = 43, a(A009991(n)) = 47.
a(n) = Sum_{d|n} d * c(d), where c = A010051. - Wesley Ivan Hurt, Jun 22 2024
EXAMPLE
a(18) = 5 because 18 = 2 * 3^2 and 2 + 3 = 5.
a(19) = 19 because 19 is prime.
a(20) = 7 because 20 = 2^2 * 5 and 2 + 5 = 7.
MAPLE
A008472 := n -> add(d, d = select(isprime, numtheory[divisors](n))):
seq(A008472(i), i = 1..40); # Peter Luschny, Jan 31 2012
A008472 := proc(n)
add( d, d= numtheory[factorset](n)) ;
end proc: # R. J. Mathar, Jul 08 2012
MATHEMATICA
Prepend[Array[Plus @@ First[Transpose[FactorInteger[#]]] &, 100, 2], 0]
Join[{0}, Rest[Total[Transpose[FactorInteger[#]][[1]]]&/@Range[100]]] (* Harvey P. Dale, Jun 18 2012 *)
(* Requires version 7.0+ *) Table[DivisorSum[n, # &, PrimeQ[#] &], {n, 75}] (* Alonso del Arte, Dec 13 2014 *)
Table[Sum[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
PROG
(PARI) sopf(n) = local(fac=factor(n)); sum(i=1, matsize(fac)[1], fac[i, 1])
(PARI) vector(100, n, vecsum(factor(n)[, 1]~)) \\ Derek Orr, May 13 2015
(PARI) A008472(n)=vecsum(factor(n)[, 1]) \\ M. F. Hasler, Jul 18 2015
(Sage)
def A008472(n):
return add(d for d in divisors(n) if is_prime(d))
print([A008472(i) for i in (1..40)]) # Peter Luschny, Jan 31 2012
(Sage) [sum(prime_factors(n)) for n in range(1, 74)] # Giuseppe Coppoletta, Jan 19 2015
(Haskell)
a008472 = sum . a027748_row -- Reinhard Zumkeller, Mar 29 2012
(Magma) [n eq 1 select 0 else &+[p[1]: p in Factorization(n)]: n in [1..100]]; // Vincenzo Librandi, Jun 24 2017
(Python)
from sympy import primefactors
def A008472(n): return sum(primefactors(n)) # Chai Wah Wu, Feb 03 2022
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
STATUS
approved