is_stein_number
def
A positive integer n is an E. P. Stein number if, with m = Nat.sqrt n, both n - m^2 and n + m^2 are positive squares.
Statement
def is_stein_number (n : ℕ) : Prop
- Defined in
- arXiv:2611.05898, Definition 1.3
- Verified
- 05 Nov 2026
- Axioms
- none listed
- Used by 4
- stein_number_countGiven a real number X, the counting function stein_number_count X is defined as the real number of natural numbers n in Finset.Ioc 0 ⌊X⌋₊…
- is_stein_number_fiveThe integer 5 is an E. P. Stein number.
- stein_param_maps_toThe map sending (d, u, v) to d^2 * (u^4 + 4 * v^4) maps each triple in stein_param_set to an integer satisfying is_stein_number.
- epstein_remoteness_of_is_stein_numberFor every natural number n, if n is an E. P. Stein number (is_stein_number n), then its remoteness epstein_remoteness n is equal to 2.
Read back from the Lean
For a natural number $n$, is_stein_number n asserts that $0 < n$ and, letting $m = \text{Nat.sqrt } n$ (the integer square root of $n$), all of the following hold:
1. $0 < n - m^2$,
2. $n - m^2$ is a square (there exists a natural number $s$ such that $n - m^2 = s^2$),
3. $0 < n + m^2$, and
4. $n + m^2$ is a square (there exists a natural number $t$ such that $n + m^2 = t^2$).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Predicate asserting that n is a positive integer such that n - m^2 and n + m^2 are positive squares for m = Nat.sqrt n. -/ def is_stein_number (n : ℕ) : Prop := 0 < n ∧ let m := Nat.sqrt n 0 < n - m^2 ∧ IsSquare (n - m^2) ∧ 0 < n + m^2 ∧ IsSquare (n + m^2)