cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A068486 Smallest prime equal to n^2 + m^2 with n >= m.

Original entry on oeis.org

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

Views

Author

Lekraj Beedassy, Mar 11 2002

Keywords

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

Crossrefs

Cf. A068487. The values of m are given by A069003.

Programs

  • 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 *)
  • PARI
    a(n) = for (m=1, n, if (isprime(p=n^2+m^2), return (p))); \\ Michel Marcus, Jan 22 2017

Formula

a(n) = n^2 + A069003(n)^2. - Thomas Ordowski, Aug 19 2014

Extensions

More terms from Sascha Kurz, Mar 17 2002