login
A097689
Number of prime pairs (p,q) with p^2 + q^2 <= n^2.
1
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, 73, 76, 76, 78, 88, 88, 100, 103, 107, 109, 111, 113, 123, 127, 129, 131, 142, 146, 159, 165, 167, 169, 183, 191, 193, 197, 201, 204, 214, 218, 224, 230, 233, 233, 245, 252, 268
OFFSET
1,4
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..10000
MATHEMATICA
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];
Array[a, 100] (* Jean-François Alcover, Nov 18 2021 *)
CROSSREFS
Sequence in context: A034772 A197138 A065309 * A349609 A258326 A308769
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Sep 21 2004
STATUS
approved