Proving last digit conjecture in A137098
2026-10-23 [home]
This page contains generated content delineated using this shadowing style.
A137098 is a sequence
consisting of numbers for which both and
use only the decimal digits
A conjecture from Jan 2016 states that every term beyond the first two ends in . More precisely,
If belongs to
A137098and , then .
This conjecture is true. The proof machine-checked
and compiles with only propext, Classical.choice,
Quot.sound.
Proof
def allowedDigits : Finset ℕ := {2, 4, 5, 7, 9}
def UsesAllowed (n : ℕ) : Prop :=
∀ d ∈ Nat.digits 10 n, d ∈ allowedDigits
def IsTerm (k : ℕ) : Prop :=
0 < k ∧ UsesAllowed k ∧ UsesAllowed (k ^ 2)
theorem last_digit_seven_except_first_two (k : ℕ) (h : IsTerm k)
(hk2 : k ≠ 2) (hk5 : k ≠ 5) : k % 10 = 7
We use the membership hypothesis: To prove the statement, first square the possible units digits modulo 10:
Since 6 and 1 are forbidden, a term can end only in 2, 5, or 7.
Suppose a multidigit term ends in 2. Write and let , the tens digit of . Expanding the square gives
To find the tens digit of , we need only its last two digits. Adding , a multiple of 100, leaves both of those digits unchanged. Writing also gives , hence
The final supplies the units digit without a carry into the tens place. The tens digit is therefore . Because has at least two digits, must belong to . The five possibilities are as follows:
| Tens digit of | Tens digit of | |
|---|---|---|
| 2 | 8 | 8 |
| 4 | 16 | 6 |
| 5 | 20 | 0 |
| 7 | 28 | 8 |
| 9 | 36 | 6 |
Like before, these are forbidden. Thus, no term beyond the first two can end in 2.
Similarly, if a multidigit term ends in 5, write . Then
Its hundreds digit is . For , that is only 0 or 6: Forbidden. Thus only the single digit term 5 can end in 5.
Every remaining term must end in 7.
Source
The source code for this proof can be found on my GitHub.
AI Disclosure
These results were obtained primarily using a mix of Anthropic, OpenAI, and open weight models in a private benchmark using a bespoke harness.