login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A005078 Sum of primes = 1 mod 4 dividing n. 6
0, 0, 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 13, 0, 5, 0, 17, 0, 0, 5, 0, 0, 0, 0, 5, 13, 0, 0, 29, 5, 0, 0, 0, 17, 5, 0, 37, 0, 13, 5, 41, 0, 0, 0, 5, 0, 0, 0, 0, 5, 17, 13, 53, 0, 5, 0, 0, 29, 0, 5, 61, 0, 0, 0, 18, 0, 0, 17, 0, 5, 0, 0, 73, 37, 5, 0, 0, 13, 0, 5, 0, 41, 0, 0, 22, 0, 29, 0, 89, 5, 13, 0, 0, 0, 5, 0, 97, 0, 0, 5, 101 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
FORMULA
Additive with a(p^e) = p if p = 1 (mod 4), 0 otherwise.
a(n) = A008472(n) - A005082(n) - 2*A059841(n). - Antti Karttunen, Jul 11 2017
MATHEMATICA
Array[DivisorSum[#, # &, And[PrimeQ@ #, Mod[#, 4] == 1] &] &, 101] (* Michael De Vlieger, Jul 11 2017 *)
f[p_, e_] := If[Mod[p, 4] == 1, p, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 21 2022 *)
PROG
(PARI) a(n)=my(f=factor(n)[, 1]); sum(i=1, #f, if(f[i]%4==1, f[i])) \\ Charles R Greathouse IV, Mar 11 2014
(Scheme) (define (A005078 n) (if (= 1 n) 0 (+ (if (= 1 (modulo (A020639 n) 4)) (A020639 n) 0) (A005078 (A028234 n))))) ;; Antti Karttunen, Jul 11 2017
CROSSREFS
Sequence in context: A336881 A369449 A324323 * A284446 A270030 A284104
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Antti Karttunen, Jul 11 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 25 04:49 EDT 2024. Contains 374586 sequences. (Running on oeis4.)