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 A008474 #55 Feb 16 2025 08:32:32 %S A008474 0,3,4,4,6,7,8,5,5,9,12,8,14,11,10,6,18,8,20,10,12,15,24,9,7,17,6,12, %T A008474 30,13,32,7,16,21,14,9,38,23,18,11,42,15,44,16,11,27,48,10,9,10,22,18, %U A008474 54,9,18,13,24,33,60,14,62,35,13,8,20,19,68,22,28,17,72,10,74,41,11,24,20,21 %N A008474 If n = Product (p_j^k_j) then a(n) = Sum (p_j + k_j). %C A008474 a(1) = 0 by convention, but could equally be taken to be 1 or 2. %C A008474 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 %C A008474 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 %H A008474 Reinhard Zumkeller, <a href="/A008474/b008474.txt">Table of n, a(n) for n = 1..10000</a> %H A008474 Daniel Tsai, <a href="http://math.colgate.edu/~integers/v32/v32.mail.html">A recurring pattern in natural numbers of a certain property</a>, Integers (2021) Vol. 21, Article #A32. %H A008474 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeFactorization.html">Prime Factorization</a> %F A008474 Additive with a(p^e) = p + e. %p A008474 A008474 := proc(n) local e,j; e := ifactors(n)[2]: %p A008474 add(e[j][1]+e[j][2],j=1..nops(e)) end: %p A008474 seq (A008474(n), n=1..60); %p A008474 # _Peter Luschny_, Jan 17 2011 %t A008474 A008474[n_]:=Plus@@Flatten[FactorInteger[n]]; Table[A008474[n], {n, 200}] (* _Zak Seidov_, May 23 2005 *) %o A008474 (Haskell) %o A008474 a008474 n = sum $ zipWith (+) (a027748_row n) (a124010_row n) %o A008474 -- _Reinhard Zumkeller_, Feb 11 2012, Aug 27 2011 %o A008474 (PARI) {for(k=1, 79, %o A008474 M=factor(k); smt =0; %o A008474 for(i=1, matsize(M)[1], for(j=1, matsize(M)[2], smt=smt+M[i,j])); %o A008474 print1(smt, ", "))} \\\ _Douglas Latimer_, Apr 27 2012 %o A008474 (PARI) a(n)=my(f=factor(n)); sum(i=1,#f~,f[i,1]+f[i,2]) \\ _Charles R Greathouse IV_, Jun 03 2015 %o A008474 (Python) %o A008474 from sympy import factorint %o A008474 def a(n): return 0 if n == 1 else sum(p+k for p, k in factorint(n).items()) %o A008474 print([a(n) for n in range(1, 79)]) # _Michael S. Branicky_, Mar 28 2022 %Y A008474 Cf. A107737, A107738, A000026, A027748, A124010, A250030. %K A008474 nonn %O A008474 1,2 %A A008474 _Olivier Gérard_ %E A008474 More terms from _Zak Seidov_, May 23 2005