%I #47 Jan 31 2017 12:03:14
%S 2,5,13,17,29,37,53,73,97,101,137,193,173,197,229,257,293,349,397,401,
%T 457,509,593,577,641,677,733,809,857,1021,977,1033,1093,1181,1229,
%U 1297,1373,1453,1621,1601,1697,1789,1913,2017,2029,2141,2213,2473,2417,2549
%N Smallest prime equal to n^2 + m^2 with n >= m.
%C With i being the imaginary unit, the numbers m + ni and m - ni are Gaussian primes. - _Alonso del Arte_, Feb 07 2011
%C All terms after the first are congruent to 1 (mod 4). - _Carmine Suriano_, Mar 30 2011
%C 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
%C 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
%H T. D. Noe, <a href="/A068486/b068486.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = n^2 + A069003(n)^2. - _Thomas Ordowski_, Aug 19 2014
%p 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);
%t Table[k = 1; While[p = n^2 + k^2; Not[PrimeQ[p]], k++]; p, {n, 50}] (* _Alonso del Arte_, Feb 07 2011 *)
%o (PARI) a(n) = for (m=1, n, if (isprime(p=n^2+m^2), return (p))); \\ _Michel Marcus_, Jan 22 2017
%Y Cf. A068487. The values of m are given by A069003.
%K nonn
%O 1,1
%A _Lekraj Beedassy_, Mar 11 2002
%E More terms from _Sascha Kurz_, Mar 17 2002