login
A263721
The prime p in the Fouvry-Iwaniec prime k^2 + p^2 (A185086), or the larger of k and p if both are prime.
3
2, 3, 5, 5, 7, 5, 3, 5, 3, 7, 11, 7, 11, 13, 7, 2, 13, 13, 5, 17, 13, 11, 5, 17, 7, 17, 19, 3, 17, 7, 19, 5, 11, 19, 13, 23, 5, 17, 19, 13, 23, 5, 2, 19, 17, 11, 5, 23, 29, 29, 23, 19, 29, 13, 31, 31, 23, 11, 3, 5, 31, 13, 2, 29, 5, 13, 31, 2, 11, 5, 31, 37, 23, 37, 3, 7, 23, 3, 13, 31, 19, 37, 41, 11
OFFSET
1,1
COMMENTS
The sequence is well-defined by the uniqueness part of Fermat's two-squares theorem.
The sequence is infinite, since Fouvry and Iwaniec proved that A185086 is infinite.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Étienne Fouvry and Henryk Iwaniec, Gaussian primes, Acta Arithmetica 79:3 (1997), pp. 249-287.
FORMULA
a(n)^2 = A185086(n) - k^2 for some integer k > 0.
EXAMPLE
A185086(2) = 13 = 2^2 + 3^2 and A185086(6) = 61 = 5^2 + 6^2, so a(2) = 3 and a(6) = 5.
MATHEMATICA
p = 2; lst = {}; While[p < 100, k = 1; While[k < 101, If[PrimeQ[k^2 + p^2], AppendTo[lst, {k^2 + p^2, If[PrimeQ@ k, Max[k, p], p]}]]; k++]; p = NextPrime@ p]; Transpose[Union@ lst][[2]]
PROG
(PARI) do(lim)=my(v=List(), p2, t); forprime(p=2, sqrtint(lim\=1), p2=p^2; for(k=1, sqrtint(lim-p2), if(isprime(t=p2+k^2), listput(v, [t, if(isprime(k), max(k, p), p)])))); v=vecsort(Set(v), 1); apply(u->u[2], v) \\ Charles R Greathouse IV, Aug 21 2017
KEYWORD
nonn
AUTHOR
STATUS
approved