A107463 a(0)=0, a(n)=1 if n is 1 or is a prime, otherwise sum of prime factors of n with multiplicity.
0, 1, 1, 1, 4, 1, 5, 1, 6, 6, 7, 1, 7, 1, 9, 8, 8, 1, 8, 1, 9, 10, 13, 1, 9, 10, 15, 9, 11, 1, 10, 1, 10, 14, 19, 12, 10, 1, 21, 16, 11, 1, 12, 1, 15, 11, 25, 1, 11, 14, 12, 20, 17, 1, 11, 16, 13, 22, 31, 1, 12, 1, 33, 13, 12, 18, 16, 1, 21, 26, 14, 1, 12, 1, 39, 13, 23, 18, 18, 1, 13, 12
Offset: 0
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 0..20000
Crossrefs
Cf. A001414.
Programs
-
Mathematica
Array[If[PrimeQ@ #, 1, Total@ Apply[Times, FactorInteger@ #, 1]] &, 81] (* Michael De Vlieger, Feb 25 2018 *)
-
PARI
A001414(n) = { my(f=factor(n)); sum(k=1, matsize(f)[1], f[k, 1]*f[k, 2]); }; \\ From A001414. A107463(n) = if(n<=1,n,if(isprime(n),1,A001414(n))); \\ Antti Karttunen, Feb 25 2018
Extensions
Edited, corrected and extended by Franklin T. Adams-Watters, May 12 2006