login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A083025 Number of primes congruent to 1 modulo 4 dividing n (with multiplicity). 35

%I

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

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

%U 0,1,0,0,1,1,2,0,0,1,0,1,0,1,0,0,2,0,1,0,1,1,1,0,0,0,1,0,1,0,0,2,1,1,0,1,1

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

%D David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 61.

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

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

%p A083025 := proc(n)

%p a := 0 ;

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

%p if op(1,f) mod 4 = 1 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]==1&]; Table[f[n],{n,100}] (* _Ray Chandler_, Dec 18 2011 *)

%o (Haskell)

%o a083025 1 = 0

%o a083025 n = length [x | x <- a027746_row n, mod x 4 == 1]

%o -- _Reinhard Zumkeller_, Jan 10 2012

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

%Y First differs from A046080 at n=65.

%Y Cf. A027746, A065339 (==3 mod 4).

%K nonn,easy,nice

%O 1,25

%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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 16 14:56 EDT 2019. Contains 324152 sequences. (Running on oeis4.)