The topic of this article may not meet Wikipedia's general notability guideline. Please help to demonstrate the notability of the topic by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to be merged, redirected, or deleted.Find sources: "Stern prime" – news · newspapers · books · scholar · JSTOR (February 2020) (Learn how and when to remove this template message)

A **Stern prime**, named for Moritz Abraham Stern, is a prime number that is not the sum of a smaller prime and twice the square of a non zero integer. That is, if for a prime *q* there is no smaller prime *p* and nonzero integer *b* such that *q* = *p* + 2*b*^{2}, then *q* is a Stern prime. The known Stern primes are

- 2, 3, 17, 137, 227, 977, 1187, 1493 (sequence A042978 in the OEIS).

So, for example, if we try subtracting from 137 the first few squares doubled in order, we get {135, 129, 119, 105, 87, 65, 39, 9}, none of which are prime. That means that 137 is a Stern prime. On the other hand, 139 is not a Stern prime, since we can express it as 137 + 2(1^{2}), or 131 + 2(2^{2}), etc.

In fact, many primes have more than one such representation. Given a twin prime, the larger prime of the pair has a Goldbach representation of *p* + 2(1^{2}). If that prime is the largest of a prime quadruplet, *p* + 8, then *p* + 2(2^{2}) is also valid. Sloane's OEIS: A007697 lists odd numbers with at least *n* Goldbach representations. Leonhard Euler observed that as numbers get larger, they have more representations of the form , suggesting that there may be a largest number with no such representations; i.e., the above list of Stern primes might be not only finite, but complete. According to Jud McCranie, these are the only Stern primes from among the first 100000 primes. All the known Stern primes have more efficient Waring representations than their Goldbach representations would suggest.

There also exist odd composite Stern numbers: the only known ones are 5777 and 5993. Goldbach once incorrectly conjectured that all Stern numbers are prime. (See OEIS: A060003 for odd Stern numbers)

Christian Goldbach conjectured in a letter to Leonhard Euler that every odd integer is of the form *p* + 2*b*^{2} for integer *b* and prime *p*. Laurent Hodges believes that Stern became interested in the problem after reading a book of Goldbach's correspondence. At the time, 1 was considered a prime, so 3 was not considered a Stern prime given the representation 1 + 2(1^{2}). The rest of the list remains the same under either definition.