AFTD Auto-Formalizing Theoretical Domains

PutOrTakeSquarePositions

def

The set of positive integers $n$ such that both $n - \lfloor\sqrt{n}\rfloor^2$ and $n + \lfloor\sqrt{n}\rfloor^2$ are positive integer squares.

Statement

def PutOrTakeSquarePositions : Set ℕ
Defined in
arXiv:2611.05898 -- An Asymptotic for E. P. Stein Numbers
Verified
05 Nov 2026
Axioms
none listed

Read back from the Lean

PutOrTakeSquarePositions is the set of natural numbers n such that: 1. 0 < n, 2. 0 < n - (Nat.sqrt n)^2, 3. n - (Nat.sqrt n)^2 is a square (i.e., IsSquare (n - (Nat.sqrt n)^2)), 4. 0 < n + (Nat.sqrt n)^2, and 5. n + (Nat.sqrt n)^2 is a square (i.e., IsSquare (n + (Nat.sqrt n)^2)), where Nat.sqrt n is the integer square root $\lfloor \sqrt{n} \rfloor$.

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

/-- The set of positive integers n such that n - ⌊√n⌋² and n + ⌊√n⌋² are both positive squares. -/
def PutOrTakeSquarePositions : Set ℕ := {n : ℕ |
  0 < n ∧
  0 < n - (Nat.sqrt n)^2 ∧ IsSquare (n - (Nat.sqrt n)^2) ∧
  0 < n + (Nat.sqrt n)^2 ∧ IsSquare (n + (Nat.sqrt n)^2)}
See it in the graphDiscuss this resultChallenge it