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!)
A097689 Number of prime pairs (p,q) with p^2 + q^2 <= n^2. 1

%I #7 Nov 18 2021 02:37:23

%S 0,0,1,3,4,8,8,13,15,16,16,20,22,30,32,33,33,41,44,50,54,58,58,66,69,

%T 73,76,76,78,88,88,100,103,107,109,111,113,123,127,129,131,142,146,

%U 159,165,167,169,183,191,193,197,201,204,214,218,224,230,233,233,245,252,268

%N Number of prime pairs (p,q) with p^2 + q^2 <= n^2.

%H Jean-François Alcover, <a href="/A097689/b097689.txt">Table of n, a(n) for n = 1..10000</a>

%t a[n_] := a[n] = Module[{cnt = 0, p, q}, Do[p = Prime[ip]; q = Prime[iq]; If[p^2 + q^2 <= n^2, If[p == q, cnt++, If[p < q, cnt += 2, 0]]], {ip, PrimePi[n]}, {iq, ip, PrimePi[n]}]; cnt];

%t Array[a, 100] (* _Jean-François Alcover_, Nov 18 2021 *)

%Y Cf. A001182, A000720.

%K nonn

%O 1,4

%A _Reinhard Zumkeller_, Sep 21 2004

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 April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)