# Sun's conjecture (i) in OEIS A234309 is false at n = 43295

iis:2611.00423 · by devsingh-lab · https://isitsolved.com/journal/6244489752a6

**Abstract.** OEIS A234309 (Zhi-Wei Sun, 2013) conjectures that for every n > 5 there is a k with 2 < k <= n/2 such that 2^phi(k) + 2^phi(n-k) - 1 is prime, where phi is Euler's totient. This fails at n = 43295: the number is composite for every k from 3 to 21647. The failure is proved in Lean 4 and checked by the kernel with the standard axioms only. Of the 21645 values, 17340 have a prime factor below 10^8 and the other 4305 fail a Fermat test (base 2, and base 3 for the Mersenne number 2^13441 - 1), on numbers of up to 43,200 bits.

# Sun's conjecture in OEIS A234309: part (i) is false

**Theorem 1 (`OeisA234309.conjecture_i_false`).** It is not true that for every $n > 5$ there is $k$ with $2 < k \le n/2$ and $2^{\varphi(k)} + 2^{\varphi(n-k)} - 1$ prime: there is no such $k$ for $n = 43295$.

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


[OEIS A234309](https://oeis.org/A234309) (Zhi-Wei Sun, December 2013) defines, with φ Euler's
totient function,

> a(n) = the number of k with 2 < k ≤ n/2 such that 2^φ(k) + 2^φ(n−k) − 1 is prime,

and conjectures (i) a(n) > 0 for all n > 5.

**Part (i) is false. It fails at n = 43295**: the number 2^φ(k) + 2^φ(43295−k) − 1 is composite
for every k from 3 to 21647.

| Claim | How it is established |
|---|---|
| Part (i) is false at n = 43295 | A Lean 4 proof checked by the Lean kernel. `#print axioms` gives `propext`, `Classical.choice`, `Quot.sound` and nothing else: no `sorry`, no `native_decide`. |

Part (ii) of the conjecture in the same entry is not addressed.

## Reading the proof

Three files are written by hand. Start with them:

| File | What it is |
|---|---|
| [`OeisA234309/Main.lean`](https://github.com/DevSingh05/oeis-a234309/blob/main/OeisA234309/Main.lean) | The theorem |
| [`OeisA234309/Checker.lean`](https://github.com/DevSingh05/oeis-a234309/blob/main/OeisA234309/Checker.lean) | A compositeness checker that the Lean kernel can run, with its soundness proofs |
| [`OeisA234309/Sanity.lean`](https://github.com/DevSingh05/oeis-a234309/blob/main/OeisA234309/Sanity.lean) | Checks that the checker refuses primes |

Everything in [`OeisA234309/Generated/`](https://github.com/DevSingh05/oeis-a234309/blob/main/OeisA234309/Generated) is produced by
`scripts/gen_lean.py`: the certificates, and the checker applied to them.

```lean
theorem conjecture_i_false :
    ¬ ∀ n : ℕ, 5 < n →
      ∃ k : ℕ, 2 < k ∧ k ≤ n / 2 ∧ (2 ^ k.totient + 2 ^ (n - k).totient - 1).Prime
```

```
'OeisA234309.conjecture_i_false' depends on axioms: [propext, Classical.choice, Quot.sound]
```

### How the proof works

Each of the 21645 values N = 2^x + 2^y − 1 (x = φ(k), y = φ(43295 − k), up to 43,200 bits) gets
a certificate that it is composite:

- **A prime factor** below 10⁸, for 17340 of the k (80%). The kernel checks one division.
- **A failed Fermat test**, for the other 4305. If N is prime then b^(N+1) ≡ b² (mod N), by
  Fermat's little theorem (from Mathlib). Since N + 1 = 2^x + 2^y, the left side is
  b^(2^x) · b^(2^y), which needs only max(x, y) modular squarings and no reading of exponent
  bits. The base is b = 2, except for k = 15457: there x = y = 13440 and N = 2^13441 − 1 is a
  Mersenne number with prime exponent, which passes every base-2 test, so b = 3 is used.

Euler's totient is read from a table, which `Generated/PhiSpec.lean` proves equal to
`Nat.totient` by checking, for every m, the recurrence φ(m) = p·φ(m/p) or (p − 1)·φ(m/p) for a
prime factor p of m. Every check is closed by `decide +kernel`.

### Build

    lake exe cache get
    lake build

A full build took 22 minutes on an 18-core Apple laptop with 24 GB of RAM (2.4 CPU-hours). The
certificates are split over 8 files that Lake builds in parallel, each using about 2 GB.

To regenerate from scratch:

    python scripts/find_certificates.py   # factors below 10^8, then Fermat tests; about 15 minutes with gmpy2
    python scripts/gen_lean.py            # writes OeisA234309/Generated

## Independent check

`scripts/verify_independent.py 43295` is a separate program (own totient code, a gcd with the
product of the primes below 10⁵ or a Fermat test to base 3) that finds every k composite:
14722 by a small factor, 6923 by the Fermat test, none probable prime.

## Prior work

On 2026-11-28 I looked for an earlier report and found none: in the OEIS entry A234309, in
google-deepmind/formal-conjectures (no file for this sequence), in
lefttosolve2/open-math-agents (the statement is there, unproved), on isitsolved.com, or by GitHub
code search. If an earlier report exists, please open an issue and I will credit it here.

## Credits

Found on 2026-11-28 by Dev Pratap Singh, in a search of Sun's December 2013 family of
conjectures. The search, certificates and Lean proof were produced with AI assistance (Claude,
Anthropic); two ideas used in the search (reusing primality results across n, and discarding
algebraic composites) came from a consultation with OpenAI Codex. MIT license.

