login
A068486
Smallest prime equal to n^2 + m^2 with n >= m.
3
2, 5, 13, 17, 29, 37, 53, 73, 97, 101, 137, 193, 173, 197, 229, 257, 293, 349, 397, 401, 457, 509, 593, 577, 641, 677, 733, 809, 857, 1021, 977, 1033, 1093, 1181, 1229, 1297, 1373, 1453, 1621, 1601, 1697, 1789, 1913, 2017, 2029, 2141, 2213, 2473, 2417, 2549
OFFSET
1,1
COMMENTS
With i being the imaginary unit, the numbers m + ni and m - ni are Gaussian primes. - Alonso del Arte, Feb 07 2011
All terms after the first are congruent to 1 (mod 4). - Carmine Suriano, Mar 30 2011
Any value can occur at most once (a consequence of Alonso del Arte's comment plus unique factorization in the Gaussian integers). - Robert Israel, Aug 19 2014
Smallest prime of the form (x^2 + y^2)/2 such that |x| + |y| = 2n. Note: |x| = n - m and |y| = n + m. - Thomas Ordowski and Altug Alkan, Jan 13 2017
FORMULA
a(n) = n^2 + A069003(n)^2. - Thomas Ordowski, Aug 19 2014
MAPLE
for n from 1 to 100 do m := 1:while(not isprime(n^2+m^2)) do m := m+1; end do:a[n] := n^2+m^2:end do:q := seq(a[i], i=1..100);
MATHEMATICA
Table[k = 1; While[p = n^2 + k^2; Not[PrimeQ[p]], k++]; p, {n, 50}] (* Alonso del Arte, Feb 07 2011 *)
PROG
(PARI) a(n) = for (m=1, n, if (isprime(p=n^2+m^2), return (p))); \\ Michel Marcus, Jan 22 2017
CROSSREFS
Cf. A068487. The values of m are given by A069003.
Sequence in context: A291278 A177349 A160215 * A099332 A279687 A031439
KEYWORD
nonn
AUTHOR
Lekraj Beedassy, Mar 11 2002
EXTENSIONS
More terms from Sascha Kurz, Mar 17 2002
STATUS
approved