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 A061376 #15 Jul 04 2018 20:22:29 %S A061376 0,0,0,2,0,5,0,2,3,7,0,5,0,12,10,2,0,5,0,7,17,13,0,5,5,23,3,12,0,17,0, %T A061376 2,23,19,17,5,0,31,18,7,0,17,0,13,10,30,0,5,7,7,27,23,0,5,18,12,35,31, %U A061376 0,17,0,47,17,2,23,18,0,19,41,23,0,5,0,55,10,31,23,23,0,7 %N A061376 a(n) = f(n) + f(f(n)) where f(n) = 0 if n <= 1 or a prime, otherwise f(n) = sum of distinct primes dividing n. %C A061376 Note that this sequence differs from A058974 at n = 26, 33, 38, 52, 62, 69, 70, 74, 76, 86, 99, etc. %H A061376 Antti Karttunen, <a href="/A061376/b061376.txt">Table of n, a(n) for n = 1..16384</a> %e A061376 a(14) = 12 because f(14) = 2+7 = 9 and f(9) = 3 and 9+3 = 12. %e A061376 From _David A. Corneth_, Oct 30 2017: (Start) %e A061376 To find the first 20 terms, make a list called res with offset 1 of size 20. For each prime p, increase multiples p * k of p with k > 1 by p. This gives %e A061376 [0, 0, 0, 2, 0, 5, 0, 2, 3, 7, 0, 5, 0, 9, 8, 2, 0, 5, 0, 7]. %e A061376 Then, from the last element to the first, increase that element with the value of that element. For example, res[20] is 7, so we increase res[20] with the value of res[7]. res[7] is 0, so a(20) = 7 + 0 = 7. Repeat for all terms until 1. (End) %t A061376 f[n_Integer] := If[n == 1 || PrimeQ[n], 0, Plus@@First[ Transpose[ FactorInteger[n] ] ] ]; Table[ f[n] + f[f[n]], {n, 1, 80} ] %o A061376 (PARI) %o A061376 A008472(n) = vecsum(factor(n)[, 1]); \\ _M. F. Hasler_, Jul 18 2015 %o A061376 f(n) = if((n<=1)||isprime(n),0,A008472(n)); %o A061376 A061376(n) = f(n) + f(f(n)); \\ _Antti Karttunen_, Oct 30 2017 %o A061376 (PARI) first(n) = {my(res = vector(n)); forprime(p = 2, n, for(k = 2, n \ p, res[k*p] += p)); forstep(i = n, 1, -1, if(res[i]!=0, res[i] += res[res[i]])); res} \\ _David A. Corneth_, Oct 30 2017 %Y A061376 Cf. A008472, A058974. %K A061376 nonn,easy %O A061376 1,4 %A A061376 _Robert G. Wilson v_, Jun 08 2001 %E A061376 Minor correction to the formula from _Antti Karttunen_, Oct 30 2017