# Two conjectures of Sun in OEIS A349787 are false: 60104967 is the least counterexample

iis:2611.00358 · by devsingh-lab · https://isitsolved.com/journal/bff0e4ee70db

**Abstract.** OEIS A349787 (Zhi-Wei Sun, 2021) counts the ways to write n = x^2 + y^k + 2^a + 2^b with x >= y >= 0, a >= b >= 0 and k = 2 or 3. Conjecture 1 says every n >= 2 has such a form; Conjecture 2 is the weaker claim that every n >= 2 is a sum of two perfect powers and two powers of 2. Both fail at n = 60104967. The failure of Conjecture 1 has a 155-line Lean 4 proof checked by the kernel with the standard axioms only. The failure of Conjecture 2, and the fact that 60104967 is the least counterexample to each, are by computation with the attached script.

# A counterexample to two conjectures in OEIS A349787

**Theorem 1 (`a349787_counterexample`).** There are no natural numbers $x \ge y$, $a \ge b$ and $k \in \{2, 3\}$ with $60104967 = x^2 + y^k + 2^a + 2^b$.

Lean receipt requested on this site: https://isitsolved.com/lean/receipts/fb671f9802a7


[OEIS A349787](https://oeis.org/A349787) (Zhi-Wei Sun, 2021): a(n) is the number of ways to write
n = x² + y^k + 2^a + 2^b with nonnegative integers x ≥ y, a ≥ b and k ∈ {2, 3}. The entry
conjectures:

1. a(n) > 0 for all n ≥ 2.
2. (weaker) Every n ≥ 2 is a sum of two perfect powers (0 and 1 allowed) and two powers of 2.

**Both are false.** The number

    n = 60104967

has no representation of either kind. It is the smallest counterexample to each.

| Claim | How it is established |
|---|---|
| 60104967 fails Conjecture 1 | Lean 4 proof, [`A349787.lean`](https://github.com/DevSingh05/oeis-a349787/blob/main/A349787.lean), 155 lines. Axioms: `propext`, `Classical.choice`, `Quot.sound`. No `sorry`, no `native_decide`. |
| 60104967 fails Conjecture 2 | Computation, `scripts/verify.py`. |
| It is the smallest failure of each | Computation, `scripts/verify.py --least`: every other n in [2, 60104967] has a representation of the first kind, and therefore of the second. |

## The Lean statement

```lean
theorem a349787_counterexample :
    ¬ ∃ x y a b k : ℕ, y ≤ x ∧ b ≤ a ∧ (k = 2 ∨ k = 3) ∧
      60104967 = x ^ 2 + y ^ k + 2 ^ a + 2 ^ b
```

The proof is a finite check, organised so that the Lean kernel can run it in under a minute:

- 2^a ≤ n forces a ≤ 25, so there are 350 values m = n − 2^a − 2^b to consider.
- k = 3: y ≤ 391, and for each m and y the number m − y³ is not a square.
- k = 2: a sum of two squares is never 3, 6 or 7 mod 8, which leaves 27 values of m; for those,
  m − y² is not a square for any y ≤ 5482.
- "Not a square" is certified by a residue mod 64 or 63, or by an integer t with
  (t − 1)² < r < (t + 1)² and r ≠ t².

Build with `lake exe cache get && lake build`.

## Check it without Lean

    python scripts/verify.py            # a few seconds
    python scripts/verify.py --least    # needs numpy, about a minute

## Further failures

A scan of Conjecture 1 up to 4·10⁹ found 63 failures, the first few being 60104967, 119012631,
137290927, 258891447, 283562247. Of the first ten, 60104967 and 369927687 also fail Conjecture 2.
These further values are from a single program and are not part of the verified claims above.

## Prior work

On 2026-11-27 I looked for an earlier report and found none in the OEIS entry and its revision
history, on GitHub, or by web search. If one exists, please open an issue and I will credit it.

## Credits

Found on 2026-11-27 by Dev Pratap Singh in a computational screen of open OEIS conjectures. The
search, the checks and the Lean proof were produced with AI assistance (Claude, Anthropic).
MIT license.

