In mathematics, Euler's idoneal numbers (also called suitable numbers or convenient numbers) are the positive integers D such that any integer expressible in only one way as x2 ± Dy2 (where x2 is relatively prime to Dy2) is a prime, prime power, twice one of these, or a power of 2. In particular, a number that has two distinct representations as a sum of two squares is composite. Every idoneal number generates a set containing infinitely many primes and missing infinitely many other primes.
A positive integer n is idoneal if and only if it cannot be written as ab + bc + ac for distinct positive integer a, b, and c.
It is sufficient to consider the set { n + k2 | k2 ≤ 3 · n ∧ gcd (n, k) = 1 }; if all these numbers are of the form p, p2, 2 · p or 2s for some integer s, where p is a prime, then n is idoneal.
The 65 idoneal numbers found by Leonhard Euler and Carl Friedrich Gauss and conjectured to be the only such numbers are
In 1973, Peter J. Weinberger proved that at most one other idoneal number exists, and that the list above is complete if the generalized Riemann hypothesis holds.