Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Erdős Problem 418 · variants.odd_noncototient

Source:Erdős Problems
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

The Odd Noncototient Conjecture: every non-cototient is even. Equivalently, every odd natural number is of the form n−ϕ(n)n - \phi(n) for some nn.

This is the unconditional form of erdos_418.variants.conditional, which derives the odd case from a strengthening of the Goldbach conjecture. See [Wikipedia: Noncototient].

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.02064 [math.NT] · NS.02064v1 for this version
Declaration:Erdos418.erdos_418.variants.odd_noncototient
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100; accepted critique: up to 100
Statement hash:37a94483dcc6ef0599ffb603a4726b9972bf7484586266ab7c7608873823b207
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/ErdosProblems/418.lean

Formal statement

theorem erdos_418.variants.odd_noncototient :
    { (n - n.totient : ℕ) | n }ᶜ ⊆ { k | Even k }
Show the full Challenge.lean (142 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 418

*References:*
- [erdosproblems.com/418](https://www.erdosproblems.com/418)
- [Wikipedia: Noncototient](https://en.wikipedia.org/wiki/Noncototient)
- [BaLu05] Banks, William D. and Luca, Florian, Nonaliquots and {R}obbins numbers. Colloq. Math.
  (2005), 27--32.
- [BrSc95] Browkin, J. and Schinzel, A., On integers not of the form {$n-\phi(n)$}. Colloq. Math.
  (1995), 55-58.
- [ChZh11] Chen, Yong-Gao and Zhao, Qing-Qing, Nonaliquot numbers. Publ. Math. Debrecen (2011),
  439--442.
- [Er73b] Erdős, P., \"Über die Zahlen der Form $\sigma (n)-n$ und $n-\phi(n)$. Elem. Math.
  (1973), 83-86.
- [Gu04] Guy, Richard K., Unsolved problems in number theory. (2004), xviii+437.
- [PoPo16] Pollack, Paul and Pomerance, Carl, Some problems of Erdős on the sum-of-divisors
  function. Trans. Amer. Math. Soc. Ser. B (2016), 1-26.
-/

@[expose] public section

namespace Erdos418

set_option linter.style.formal_proof_palomar false in
/--
Are there infinitely many integers not of the form $n - \phi(n)$?

Asked by Erdős and Sierpiński. Numbers not of the form we call non-cototients.

Browkin and Schinzel [BrSc95] provided an affirmative answer to this question, proving that any
integer of the shape $2^{k}\cdot 509203$ for $k\geq 1$ is a non-cototient.

This is discussed in problem B36 of Guy's collection [Gu04].

This was formalized in Lean by Alexeev using Aristotle.
-/
@[category research solved, question, AMS 11, formal_proof using lean4 at "https://github.com/plby/lean-proofs/blob/main/src/v4.24.0/ErdosProblems/Erdos418.lean"]
theorem erdos_418 : { (n - n.totient : ℕ) | n }ᶜ.Infinite := by
  sorry

/--
It follows from a slight strengthening of the Goldbach conjecture that every odd number can be
written as $n - \phi(n)$.
In particular, we assume that every even number greater than 6 can be written as the sum of two
*distinct* primes, in contrast to the usual Goldbach conjecture that every even number greater than
2 can be written as the sum of two primes.
-/
@[category research solved, AMS 11]
theorem erdos_418.variants.conditional
    (goldbach : ∀ (n : ℕ), 6 < n → Even n → ∃ p q, p ≠ q ∧ p.Prime ∧ q.Prime ∧ n = p + q)
    (m : ℕ) (h : Odd m) :
    ∃ n, m + n.totient = n := by
  obtain rfl | rfl | rfl | h7m : m = 1 ∨ m = 3 ∨ m = 5 ∨ 7 ≤ m := by
    obtain ⟨m, rfl⟩ := h
    omega
  · exact ⟨2, rfl⟩
  · exact ⟨9, rfl⟩
  · exact ⟨25, rfl⟩
  obtain ⟨p, q, hpq, hp, hq, hm⟩ := goldbach (m + 1) (by omega) (by simpa [parity_simps])
  use p * q
  have h2p : 2 ≤ p := hp.two_le
  have h2q : 2 ≤ q := hq.two_le
  rw [Nat.totient_mul, Nat.totient_prime hp, Nat.totient_prime hq]
  · obtain ⟨p, rfl⟩ := le_iff_exists_add'.1 h2p
    obtain ⟨q, rfl⟩ := le_iff_exists_add'.1 h2q
    simp only [Nat.add_one_sub_one]
    linear_combination hm
  rwa [Nat.coprime_primes hp hq]

/--
The **Odd Noncototient Conjecture**: every non-cototient is even. Equivalently, every odd natural
number is of the form $n - \phi(n)$ for some $n$.

This is the unconditional form of `erdos_418.variants.conditional`, which derives the odd case from a
strengthening of the Goldbach conjecture. See [Wikipedia: Noncototient].
-/
@[category research open, AMS 11]
theorem erdos_418.variants.odd_noncototient :
    { (n - n.totient : ℕ) | n }ᶜ ⊆ { k | Even k } := by
  sorry

/--
A sanity check for the definition: $7$ is a cototient, since $7 = 15 - \phi(15)$ and $\phi(15) = 8$.
In particular $7$ is not a non-cototient.
-/
@[category test, AMS 11]
theorem erdos_418.variants.seven_mem_cototient :
    7 ∈ { (n - n.totient : ℕ) | n } :=
  ⟨15, by decide⟩

/--
Erdős [Er73b] has shown that a positive density set of natural numbers cannot be written as
$\sigma(n)-n$ (numbers not of this form are called nonaliquot, or sometimes untouchable).

Here "positive density" means positive lower density: Banks and Luca [BaLu05] proved that the
set of nonaliquots has lower density at least $1/48$, Chen and Zhao [ChZh11] improved this to
$0.06$, and it is not known whether the natural density of the nonaliquots exists (Pollack and
Pomerance [PoPo16] give a heuristic predicting its value).
-/
@[category research solved, AMS 11]
theorem erdos_418.variants.sigma :
    0 < {n : ℕ | n.IsUntouchable}.lowerDensity := by
  sorry

/--
A solution to erdos_418 was shown by Browkin and Schinzel [BrSc95] by showing that any integer of
the form $2^(k + 1)\cdot 509203$ is not of the form $n - \phi(n)$.
-/
@[category research solved, AMS 11]
theorem erdos_418.variants.soln :
    { 2 ^ (k + 1) * 509203 | k } ⊆ { (n - n.totient : ℕ) | n }ᶜ := by
  sorry

/--
It is open whether the set of non-cototients has positive (lower) density.
-/
@[category research open, question, AMS 11]
theorem erdos_418.variants.density :
    0 < { (n - n.totient : ℕ) | n }ᶜ.lowerDensity := by
  sorry

end Erdos418

To prove it: keep every definition of Challenge.lean unchanged and prove Erdos418.erdos_418.variants.odd_noncototient with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_odd_noncototient : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry desk erdos-418--erdos-418-variants-odd-noncototient      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch erdos-418--erdos-418-variants-odd-noncototient
nosorry submit erdos-418--erdos-418-variants-odd-noncototient nosorry/erdos-418--erdos-418-variants-odd-noncototient/Solution.lean --wait

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.