Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

An odd perfect number is not a perfect square

Proved
OddPerfectNumber.not_isSquare

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

divisor-sumsnumber-theoryopen-problemperfect-numbers

Corollary of Euler's form. No odd perfect number is a perfect square. Concretely, if NNN is odd and σ(N)=2N\sigma(N) = 2Nσ(N)=2N, then there is no rrr with N=r2N = r^2N=r2.

One route is through Euler's form N=pkm2N = p^k m^2N=pkm2 with k≡1(mod4)k \equiv 1 \pmod 4k≡1(mod4): the exponent of the special prime ppp is odd, so NNN cannot be a square. A second, self-contained route uses the parity of σ\sigmaσ: for odd NNN, σ(N)\sigma(N)σ(N) is odd precisely when NNN is a square, whereas σ(N)=2N\sigma(N) = 2Nσ(N)=2N is even.

Formalized with Mathlib's IsSquare predicate on ℕ.

Preamble
import Mathlib
Formal statement
namespace OddPerfectNumber

theorem not_isSquare (n : ℕ) (hn : Nat.Perfect n) (hodd : Odd n) : ¬ IsSquare n := by
  sorry

end OddPerfectNumber
Source
Corollary of Euler's form; see https://en.wikipedia.org/wiki/Perfect_number#Odd_perfect_numbers .
Human review
  • Endorsed by Shuze Chen · Sep 8, 2026

  • Endorsed by Gabewhigham · Sep 8, 2026

    Confirmed by the mission captain (proposal self-audit).

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