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
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
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
KEYWORD
nonn
AUTHOR
Lekraj Beedassy, Mar 11 2002
EXTENSIONS
More terms from Sascha Kurz, Mar 17 2002
STATUS
approved