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

%I #20 Jun 21 2022 05:09:33

%S 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,

%T 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,

%U 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

%N Sum of primes = 1 mod 4 dividing n.

%H Antti Karttunen, <a href="/A005078/b005078.txt">Table of n, a(n) for n = 1..10000</a>

%F Additive with a(p^e) = p if p = 1 (mod 4), 0 otherwise.

%F a(n) = A008472(n) - A005082(n) - 2*A059841(n). - _Antti Karttunen_, Jul 11 2017

%t Array[DivisorSum[#, # &, And[PrimeQ@ #, Mod[#, 4] == 1] &] &, 101] (* _Michael De Vlieger_, Jul 11 2017 *)

%t 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 *)

%o (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

%o (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

%Y Cf. A005069, A005079, A005080, A005081, A005082, A008472, A059841.

%K nonn

%O 1,5

%A _N. J. A. Sloane_

%E More terms from _Antti Karttunen_, Jul 11 2017

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 March 28 05:39 EDT 2024. Contains 371235 sequences. (Running on oeis4.)