Lean / Reader
Lean reader

Main.lean

35 lines2 declarationsno sorryimports OeisA234309.Generated.PhiSpec OeisA234309.Generated.Cover

Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports OeisA234309.Generated.PhiSpec, OeisA234309.Generated.Cover, which it does not have: you can read it there, but it will not check. Build the project itself to check it.

  1. import OeisA234309.Generated.PhiSpec
  2. import OeisA234309.Generated.Cover
  3. /-!
  4. # Part (i) of Sun's conjecture in OEIS A234309 is false
  5. [OEIS A234309](https://oeis.org/A234309) (Zhi-Wei Sun, December 2013), with `φ` Euler's totient:
  6. `a(n)` is the number of `k` with `2 < k ≤ n/2` such that `2^φ(k) + 2^φ(n-k) - 1` is prime, and
  7. part (i) of the conjecture says `a(n) > 0` for all `n > 5`.
  8. It fails at `n = 43295`: the number is composite for every `k` from `3` to `21647`.
  9. -/
  10. namespace OeisA234309
  11. /-- For `n = 43295` no `k` with `2 < k ≤ n/2` makes `2^φ(k) + 2^φ(n-k) - 1` prime. -/
  12. theorem no_prime_at_43295 (k : ℕ) (h1 : 2 < k) (h2 : k ≤ 43295 / 2) :
  13. ¬ (2 ^ k.totient + 2 ^ (43295 - k).totient - 1).Prime := by
  14. obtain ⟨q, hq⟩ := cover k h1 (by omega)
  15. have hq' : certOK (phiT k) (phiT (43295 - k)) q = true := hq
  16. have h := not_prime_of_certOK hq'
  17. rwa [phiT_eq k (by omega), phiT_eq (43295 - k) (by omega)] at h
  18. /-- Part (i) of the conjecture is false. -/
  19. theorem conjecture_i_false :
  20. ¬ ∀ n : ℕ, 5 < n →
  21. ∃ k : ℕ, 2 < k ∧ k ≤ n / 2 ∧ (2 ^ k.totient + 2 ^ (n - k).totient - 1).Prime := by
  22. intro h
  23. obtain ⟨k, h1, h2, hp⟩ := h 43295 (by norm_num)
  24. exact no_prime_at_43295 k h1 h2 hp
  25. end OeisA234309
  26. #print axioms OeisA234309.conjecture_i_false