A005082 Sum of primes = 3 mod 4 dividing n.
0, 0, 3, 0, 0, 3, 7, 0, 3, 0, 11, 3, 0, 7, 3, 0, 0, 3, 19, 0, 10, 11, 23, 3, 0, 0, 3, 7, 0, 3, 31, 0, 14, 0, 7, 3, 0, 19, 3, 0, 0, 10, 43, 11, 3, 23, 47, 3, 7, 0, 3, 0, 0, 3, 11, 7, 22, 0, 59, 3, 0, 31, 10, 0, 0, 14, 67, 0, 26, 7, 71, 3, 0, 0, 3, 19, 18, 3, 79, 0, 3, 0, 83, 10, 0, 43, 3, 11, 0, 3, 7, 23, 34, 47, 19, 3, 0, 7, 14, 0, 0, 3, 103
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[Total[Select[Transpose[FactorInteger[n]][[1]],Mod[#,4] == 3&]],{n,80}] (* Harvey P. Dale, Jan 18 2015 *) Array[DivisorSum[#, # &, And[PrimeQ@ #, Mod[#, 4] == 3] &] &, 103] (* Michael De Vlieger, Jul 11 2017 *)
-
PARI
a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k,1])%4) == 3, p)); \\ Michel Marcus, Jul 11 2017
-
Scheme
(define (A005082 n) (if (= 1 n) 0 (+ (* (A079978 (modulo (A020639 n) 4)) (A020639 n)) (A005082 (A028234 n))))) ;; Antti Karttunen, Jul 11 2017
Formula
Extensions
More terms from Antti Karttunen, Jul 11 2017