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!)
A065339 Number of primes congruent to 3 modulo 4 dividing n (with multiplicity). 27

%I #37 Jun 17 2024 07:11:29

%S 0,0,1,0,0,1,1,0,2,0,1,1,0,1,1,0,0,2,1,0,2,1,1,1,0,0,3,1,0,1,1,0,2,0,

%T 1,2,0,1,1,0,0,2,1,1,2,1,1,1,2,0,1,0,0,3,1,1,2,0,1,1,0,1,3,0,0,2,1,0,

%U 2,1,1,2,0,0,1,1,2,1,1,0,4,0,1,2,0,1,1,1,0,2,1,1,2,1,1,1,0,2,3,0,0,1,1,0,2

%N Number of primes congruent to 3 modulo 4 dividing n (with multiplicity).

%H T. D. Noe, <a href="/A065339/b065339.txt">Table of n, a(n) for n=1..10000</a>

%F a(n) = A001222(n) - A007814(n) - A083025(n).

%F (2^A007814(n)) * (3^a(n)) = A065338(n).

%F From _Antti Karttunen_, Aug 14 2015: (Start)

%F a(1) = a(2) = 0; thereafter, if n is even, a(n) = a(n/2), otherwise a(n) = ((A020639(n) mod 4)-1)/2 + a(n/A020639(n)). [Where A020639(n) gives the smallest prime factor of n.]

%F Other identities and observations. For all n >= 1:

%F a(n) = A007949(A065338(n)).

%F a(n) = A001222(A097706(n)).

%F a(n) >= A260728(n). [See A260730 for the positions of differences.] (End)

%F Totally additive with a(2) = 0, a(p) = 1 if p == 3 (mod 4), and a(p) = 0 if p == 1 (mod 4). - _Amiram Eldar_, Jun 17 2024

%p A065339 := proc(n)

%p a := 0 ;

%p for f in ifactors(n)[2] do

%p if op(1,f) mod 4 = 3 then

%p a := a+op(2,f) ;

%p end if;

%p end do:

%p a ;

%p end proc: # _R. J. Mathar_, Dec 16 2011

%t f[n_]:=Plus@@Last/@Select[If[n==1,{},FactorInteger[n]],Mod[#[[1]],4]==3&]; Table[f[n],{n,100}] (* _Ray Chandler_, Dec 18 2011 *)

%o (Haskell)

%o a065339 1 = 0

%o a065339 n = length [x | x <- a027746_row n, mod x 4 == 3]

%o -- _Reinhard Zumkeller_, Jan 10 2012

%o (PARI) A065339(n)=sum(i=1,#n=factor(n)~,if(n[1,i]%4==3,n[2,i])) \\ _M. F. Hasler_, Apr 16 2012

%o (Scheme, two variants using memoization-macro definec)

%o (definec (A065339 n) (cond ((< n 3) 0) ((even? n) (A065339 (/ n 2))) (else (+ (/ (- (modulo (A020639 n) 4) 1) 2) (A065339 (A032742 n))))))

%o (definec (A065339 n) (cond ((< n 3) 0) ((even? n) (A065339 (/ n 2))) ((= 1 (modulo (A020639 n) 4)) (A065339 (A032742 n))) (else (+ (A067029 n) (A065339 (A028234 n))))))

%o ;; _Antti Karttunen_, Aug 14 2015

%Y Cf. A001222, A007814, A065338, A005091, A007949, A083025 (analogous for 4k+1 primes), A097706.

%Y Cf. A020639, A027746, A028234, A032742, A067029, A260728, A260730.

%K nonn

%O 1,9

%A _Reinhard Zumkeller_, Oct 29 2001

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 September 1 04:03 EDT 2024. Contains 375575 sequences. (Running on oeis4.)