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 A005074 #22 Jun 21 2022 05:10:51 %S A005074 0,2,0,2,5,2,0,2,0,7,11,2,0,2,5,2,17,2,0,7,0,13,23,2,5,2,0,2,29,7,0,2, %T A005074 11,19,5,2,0,2,0,7,41,2,0,13,5,25,47,2,0,7,17,2,53,2,16,2,0,31,59,7,0, %U A005074 2,0,2,5,13,0,19,23,7,71,2,0,2,5,2,11,2,0,7,0,43,83,2,22,2,29,13,89,7,0,25,0,49,5 %N A005074 Sum of primes = 2 mod 3 dividing n. %H A005074 Antti Karttunen, <a href="/A005074/b005074.txt">Table of n, a(n) for n = 1..10000</a> %F A005074 Additive with a(p^e) = p if p = 2 (mod 3), 0 otherwise. %F A005074 a(n) = A008472(n) - A005070(n) - 3*A079978(n). - _Antti Karttunen_, Jul 10 2017 %t A005074 Array[DivisorSum[#, # &, And[PrimeQ@ #, Mod[#, 3] == 2] &] &, 95] (* _Michael De Vlieger_, Jul 11 2017 *) %t A005074 f[p_, e_] := If[Mod[p, 3] == 2, p, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* _Amiram Eldar_, Jun 21 2022 *) %o A005074 (Scheme) (define (A005074 n) (if (= 1 n) 0 (+ (if (= 2 (modulo (A020639 n) 3)) (A020639 n) 0) (A005074 (A028234 n))))) ;; _Antti Karttunen_, Jul 10 2017 %o A005074 (PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k,1])%3) == 2, p)); \\ _Michel Marcus_, Jul 11 2017 %Y A005074 Cf. A005070, A005075, A005076, A005077, A005090, A008472, A079978. %K A005074 nonn %O A005074 1,2 %A A005074 _N. J. A. Sloane_ %E A005074 More terms from _Antti Karttunen_, Jul 10 2017