This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A005070 Sum of primes = 1 (mod 3) dividing n. 6
 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 13, 7, 0, 0, 0, 0, 19, 0, 7, 0, 0, 0, 0, 13, 0, 7, 0, 0, 31, 0, 0, 0, 7, 0, 37, 19, 13, 0, 0, 7, 43, 0, 0, 0, 0, 0, 7, 0, 0, 13, 0, 0, 0, 7, 19, 0, 0, 0, 61, 31, 7, 0, 13, 0, 67, 0, 0, 7, 0, 0, 73, 37, 0, 19, 7, 13, 79, 0, 0, 0, 0, 7, 0, 43, 0, 0, 0, 0, 20, 0, 31, 0, 19, 0, 97, 7, 0, 0, 0, 0, 103, 13, 7, 0, 0, 0, 109, 0, 37 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,7 LINKS Antti Karttunen, Table of n, a(n) for n = 1..10001 FORMULA Additive with a(p^e) = p if p = 1 (mod 3), 0 otherwise. a(1) = 0; for n > 1, a(n) = a(A028234(n)) + A020639(n)*[A020639(n) ≡ 1 (mod 3)]. (Here [] is Iverson bracket, giving in this case 1 whenever the smallest prime is of the form 3k+1, and 0 otherwise.) - Antti Karttunen, May 12 2017 EXAMPLE For n = 5, a(5) = 0 as 5 modulo 3 = 2. For n = 49 = 7*7, a(49) = 7 as 7 modulo 3 = 1, and each such prime is counted only once. For n = 91 = 7*13, a(91) = 7+13 = 20, as both primes are of the form 3k+1. For n = 10001 = 73*137, only 73 is of the form 3k+1, thus a(10001) = 73. MATHEMATICA Table[DivisorSum[n, # &, And[PrimeQ@ #, Mod[#, 3] == 1] &], {n, 111}] (* Michael De Vlieger, May 12 2017 *) PROG (Scheme) (define (A005070 n) (if (= 1 n) 0 (+ (if (= 1 (modulo (A020639 n) 3)) (A020639 n) 0) (A005070 (A028234 n))))) (Python) from sympy import factorint, primefactors def a028234(n):     f = factorint(n)     m = min(f)     return 1 if n==1 else n/(m**f[m]) def a020639(n): return min(primefactors(n)) if n>1 else 1 def a(n): return 0 if n==1 else a(a028234(n)) + a020639(n)*(1*(a020639(n)%3==1)) # Indranil Ghosh, May 12 2017 CROSSREFS Cf. A020639, A028234. Sequence in context: A106226 A229658 A306755 * A135435 A171917 A198919 Adjacent sequences:  A005067 A005068 A005069 * A005071 A005072 A005073 KEYWORD nonn AUTHOR EXTENSIONS More terms and examples from Antti Karttunen, May 12 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 22 12:19 EDT 2019. Contains 327307 sequences. (Running on oeis4.)