Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Nielsen's upper bound for odd n/dn/dn/d-perfect Diophantine solutions

Proved
OddPerfectNumber.nielsen_diophantine_bound

by Gabewhigham · Sep 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

diophantine-equationsdivisor-sumsnumber-theoryperfect-numbers

Nielsen's upper bound for solutions of the perfect-number Diophantine equation.

Fix positive integers nnn and ddd. Following Nielsen, a positive integer NNN is called n/dn/dn/d-perfect when σ(N)/N=n/d\sigma(N)/N = n/dσ(N)/N=n/d (the fraction need not be in lowest terms); the case n/d=2n/d = 2n/d=2 is the classical notion of a perfect number. Writing N=∏i=1kpieiN=\prod_{i=1}^{k}p_i^{e_i}N=∏i=1k​piei​​, the equation σ(N)/N=n/d\sigma(N)/N = n/dσ(N)/N=n/d becomes

d∏i=1k(∑j=0eipi j)  =  n∏i=1kpi ei.d\prod_{i=1}^{k}\Bigl(\sum_{j=0}^{e_i}p_i^{\,j}\Bigr)\;=\;n\prod_{i=1}^{k}p_i^{\,e_i}.di=1∏k​(j=0∑ei​​pij​)=ni=1∏k​piei​​.

The theorem below is the abstract form of this equation, in which the pip_ipi​ are replaced by arbitrary distinct odd integers x1,…,xkx_1,\dots,x_kx1​,…,xk​ greater than 111 (they need not be prime, so the statement also covers Descartes-style "spoof" odd perfect numbers).

Theorem. Let k,n,dk, n, dk,n,d be positive integers. Let X={x1,…,xk}X=\{x_1,\dots,x_k\}X={x1​,…,xk​} be a non-empty finite set of odd integers, each greater than 111, and let e1,…,eke_1,\dots,e_ke1​,…,ek​ be positive integers such that

d∏i=1k(∑j=0eixi j)  =  n∏i=1kxi ei.d\prod_{i=1}^{k}\Bigl(\sum_{j=0}^{e_i}x_i^{\,j}\Bigr)\;=\;n\prod_{i=1}^{k}x_i^{\,e_i}.di=1∏k​(j=0∑ei​​xij​)=ni=1∏k​xiei​​.

Then, writing Π(X)=∏i=1kxi\Pi(X)=\prod_{i=1}^{k}x_iΠ(X)=∏i=1k​xi​ and Π′(X)=∏i=1k(xi−1)\Pi'(X)=\prod_{i=1}^{k}(x_i-1)Π′(X)=∏i=1k​(xi​−1),

(∏i=1kxi ei)⋅n Π(X) Π′(X)  <  (d+1)22k.\Bigl(\prod_{i=1}^{k}x_i^{\,e_i}\Bigr)\cdot n\,\Pi(X)\,\Pi'(X)\;<\;(d+1)^{2^{2k}} .(i=1∏k​xiei​​)⋅nΠ(X)Π′(X)<(d+1)22k.

Equivalently ∏ixiei<(d+1)4k/(n Π(X) Π′(X))\prod_i x_i^{e_i} < (d+1)^{4^{k}}/\bigl(n\,\Pi(X)\,\Pi'(X)\bigr)∏i​xiei​​<(d+1)4k/(nΠ(X)Π′(X)).

This is the finiteness engine behind all known upper bounds for odd perfect numbers: for fixed kkk it bounds every solution of the equation, and specialising to n=2n=2n=2, d=1d=1d=1 and xix_ixi​ the prime divisors of an odd perfect number NNN yields the bound N<24kN < 2^{4^{k}}N<24k of Nielsen (2003). The extra factor n Π(X) Π′(X)n\,\Pi(X)\,\Pi'(X)nΠ(X)Π′(X) on the left is the sharpening obtained in the 2015 paper, which is what makes the bound usable in computations.

Formalization Note. The finite set XXX carries the distinctness of the xix_ixi​ automatically, kkk is X.card, and the exponents are given by a function e : ℕ → ℕ whose values on XXX are required to be positive. Subtraction x - 1 is truncated subtraction on ℕ, which is harmless because every x∈Xx \in Xx∈X satisfies x>1x > 1x>1.

Preamble
import Mathlib
open Finset
Formal statement
namespace OddPerfectNumber

theorem nielsen_diophantine_bound (n d : ℕ) (X : Finset ℕ) (e : ℕ → ℕ)
    (hn : 0 < n) (hd : 0 < d) (hX : X.Nonempty)
    (hodd : ∀ x ∈ X, Odd x) (hone : ∀ x ∈ X, 1 < x) (he : ∀ x ∈ X, 0 < e x)
    (heq : d * ∏ x ∈ X, ∑ j ∈ Finset.range (e x + 1), x ^ j = n * ∏ x ∈ X, x ^ e x) :
    (∏ x ∈ X, x ^ e x) * (n * ((∏ x ∈ X, x) * ∏ x ∈ X, (x - 1)))
      < (d + 1) ^ 2 ^ (2 * X.card) := by
  sorry

end OddPerfectNumber
Source
P. P. Nielsen, Odd perfect numbers, Diophantine equations, and upper bounds, Math. Comp. 84 (2015), no. 295, 2549-2567; Section 1, equation (1) and Theorem 1.6 (p. 6). Author's copy: https://mathdept.byu.edu/~pace/BestBound_web.pdf . Specialises to P. P. Nielsen, An upper bound for odd perfect numbers, INTEGERS 3 (2003), #A14, Theorem 1.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me