This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A008472 #143 Jun 22 2024 19:12:39 %S A008472 0,2,3,2,5,5,7,2,3,7,11,5,13,9,8,2,17,5,19,7,10,13,23,5,5,15,3,9,29, %T A008472 10,31,2,14,19,12,5,37,21,16,7,41,12,43,13,8,25,47,5,7,7,20,15,53,5, %U A008472 16,9,22,31,59,10,61,33,10,2,18,16,67,19,26,14,71,5,73 %N A008472 Sum of the distinct primes dividing n. %C A008472 Sometimes called sopf(n). %C A008472 Sum of primes dividing n (without repetition) (compare A001414). %C A008472 Equals A051731 * A061397 = inverse Mobius transform of [0, 2, 3, 0, 5, 0, 7, ...]. - _Gary W. Adamson_, Feb 14 2008 %C A008472 Equals row sums of triangle A143535. - _Gary W. Adamson_, Aug 23 2008 %C A008472 a(n) = n if and only if n is prime. - _Daniel Forgues_, Mar 24 2009 %C A008472 a(n) = n is a new record if and only if n is prime. - _Zak Seidov_, Jun 27 2009 %C A008472 a(A001043(n)) = A191583(n); %C A008472 For n > 0: a(A000079(n)) = 2, a(A000244(n)) = 3, a(A000351(n)) = 5, a(A000420(n)) = 7; %C A008472 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 %C A008472 For n > 1: a(n) = Sum(A027748(n,k): 1 <= k <= A001221(n)). - _Reinhard Zumkeller_, Aug 27 2011 %C A008472 If n is the product of twin primes (A037074), a(n) = 2*sqrt(n+1) = sqrt(4n+4). - _Wesley Ivan Hurt_, Sep 07 2013 %C A008472 From _Wilf A. Wilson_, Jul 21 2017: (Start) %C A008472 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. %C A008472 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. %C A008472 (End) %C A008472 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 %H A008472 Daniel Forgues, <a href="/A008472/b008472.txt">Table of n, a(n) for n = 1..100000</a> (first 10000 terms from Franklin T. Adams-Watters) %H A008472 Johann Bartel, R. K. Bhaduri, Matthias Brack, and M. V. N. Murthy, <a href="https://arxiv.org/abs/1609.06497">On the asymptotic prime partitions of integers</a>, arXiv:1609.06497 [math-ph], 2017. %H A008472 James East, Jitender Kumar, James D. Mitchell, and Wilf A. Wilson, <a href="https://arxiv.org/abs/1706.04967">Maximal subsemigroups of finite transformation and partition monoids</a>, arXiv:1706.04967 [math.GR], 2017. [_Wilf A. Wilson_, Jul 21 2017] %F A008472 Let n = Product_j prime(j)^k(j) where k(j) >= 1, then a(n) = Sum_j prime(j). %F A008472 Additive with a(p^e) = p. %F A008472 G.f.: Sum_{k >= 1} prime(k)*x^prime(k)/(1-x^prime(k)). - _Franklin T. Adams-Watters_, Sep 01 2009 %F A008472 L.g.f.: -log(Product_{k>=1} (1 - x^prime(k))) = Sum_{n>=1} a(n)*x^n/n. - _Ilya Gutkovskiy_, May 06 2017 %F A008472 Dirichlet g.f.: primezeta(s-1)*zeta(s). - _Benedict W. J. Irwin_, Jul 11 2018 %F A008472 a(n) = Sum_{p|n, p prime} p. - _Wesley Ivan Hurt_, Feb 04 2022 %F A008472 From _Bernard Schott_, Feb 07 2022: (Start) %F A008472 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. %F A008472 For p odd prime, a(2*p) = p+2 <==> a(A100484(n)) = A052147(n) for n > 1. (End) %F A008472 a(n) = Sum_{d|n} d * c(d), where c = A010051. - _Wesley Ivan Hurt_, Jun 22 2024 %e A008472 a(18) = 5 because 18 = 2 * 3^2 and 2 + 3 = 5. %e A008472 a(19) = 19 because 19 is prime. %e A008472 a(20) = 7 because 20 = 2^2 * 5 and 2 + 5 = 7. %p A008472 A008472 := n -> add(d, d = select(isprime, numtheory[divisors](n))): %p A008472 seq(A008472(i), i = 1..40); # _Peter Luschny_, Jan 31 2012 %p A008472 A008472 := proc(n) %p A008472 add( d, d= numtheory[factorset](n)) ; %p A008472 end proc: # _R. J. Mathar_, Jul 08 2012 %t A008472 Prepend[Array[Plus @@ First[Transpose[FactorInteger[#]]] &, 100, 2], 0] %t A008472 Join[{0}, Rest[Total[Transpose[FactorInteger[#]][[1]]]&/@Range[100]]] (* _Harvey P. Dale_, Jun 18 2012 *) %t A008472 (* Requires version 7.0+ *) Table[DivisorSum[n, # &, PrimeQ[#] &], {n, 75}] (* _Alonso del Arte_, Dec 13 2014 *) %t A008472 Table[Sum[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* _Vaclav Kotesovec_, May 20 2020 *) %o A008472 (PARI) sopf(n) = local(fac=factor(n)); sum(i=1,matsize(fac)[1],fac[i,1]) %o A008472 (PARI) vector(100,n,vecsum(factor(n)[,1]~)) \\ _Derek Orr_, May 13 2015 %o A008472 (PARI) A008472(n)=vecsum(factor(n)[,1]) \\ _M. F. Hasler_, Jul 18 2015 %o A008472 (Sage) %o A008472 def A008472(n): %o A008472 return add(d for d in divisors(n) if is_prime(d)) %o A008472 print([A008472(i) for i in (1..40)]) # _Peter Luschny_, Jan 31 2012 %o A008472 (Sage) [sum(prime_factors(n)) for n in range(1,74)] # _Giuseppe Coppoletta_, Jan 19 2015 %o A008472 (Haskell) %o A008472 a008472 = sum . a027748_row -- _Reinhard Zumkeller_, Mar 29 2012 %o A008472 (Magma) [n eq 1 select 0 else &+[p[1]: p in Factorization(n)]: n in [1..100]]; // _Vincenzo Librandi_, Jun 24 2017 %o A008472 (Python) %o A008472 from sympy import primefactors %o A008472 def A008472(n): return sum(primefactors(n)) # _Chai Wah Wu_, Feb 03 2022 %Y A008472 First difference of A024924. %Y A008472 Cf. A001414 (sopfr), A001222, A051731, A061397, A064502, A085020, A143535. %Y A008472 Sum of the k-th powers of the primes dividing n for k=0..10 : A001221 (k=0), this sequence (k=1), A005063 (k=2), A005064 (k=3), A005065 (k=4), A351193 (k=5), A351194 (k=6), A351195 (k=7), this sequence (k=8), A351197 (k=9), A351198 (k=10). %Y A008472 Cf. A010051. %K A008472 nonn,nice,easy %O A008472 1,2 %A A008472 _Olivier Gérard_