Draft — mutable and not usable as a dependency; its citation marks the draft state.

Lax59.InterestingNumbers

Classification of Interesting Numbers

concepts/Lax59/InterestingNumbers.lean · lax-59

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Concept map

    Proven claimThis concept

    Evidence

    Each proof establishes this claim relative to its assumptions.

    Theorem

    Let nn be interesting when there are distinct primes pp and qq such that n=pqn=pq, and when replacing pp by its next prime and qq by its previous prime gives a factorization of n+1n+1. Then nn is interesting exactly when n=14n=14 or n=21n=21.

    The two factors are existentially labelled. This is equivalent to the opposite labelling used in mathlib4 issue #6091 because multiplication is commutative.

    Lean source view on GitHub

    1import Mathlib
    2
    3/-!
    4---
    5title: Classification of Interesting Numbers
    6type: theorem
    7---
    8Let nn be interesting when there are distinct primes pp and qq such that
    9n=pqn=pq, and when replacing pp by its next prime and qq by its previous prime
    10gives a factorization of n+1n+1. Then nn is interesting exactly when
    11n=14n=14 or n=21n=21.
    12
    13The two factors are existentially labelled. This is equivalent to the
    14opposite labelling used in mathlib4 issue #6091 because multiplication is
    15commutative.
    16-/
    17
    18namespace Lax59.InterestingNumbers
    19
    20/-- The number called `pNext` is the first prime strictly after `p`. -/
    21def NextPrime (p pNext : ℕ) : Prop :=
    22 pNext.Prime ∧ p < pNext ∧ ∀ r, r.Prime → p < r → pNext ≤ r
    23
    24/-- The number called `qPrev` is the last prime strictly before `q`. -/
    25def PrevPrime (qPrev q : ℕ) : Prop :=
    26 qPrev.Prime ∧ qPrev < q ∧ ∀ r, r.Prime → r < q → r ≤ qPrev
    27
    28/-- The neighboring-prime factorization property from issue #6091. -/
    29def Interesting (n : ℕ) : Prop :=
    30 ∃ p q pNext qPrev : ℕ,
    31 p.Prime ∧ q.Prime ∧ p ≠ q ∧
    32 NextPrime p pNext ∧ PrevPrime qPrev q ∧
    33 n = p * q ∧ n + 1 = pNext * qPrev
    34
    35/-- Exactly 14 and 21 satisfy the interesting-number property. -/
    36axiom interesting_iff (n : ℕ) : Interesting n ↔ n = 14 ∨ n = 21
    37
    38end Lax59.InterestingNumbers
    39
    Show Proof

    Builds on

    none

    Used by

    none

    From Mathlib

    Community review

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.

    0 comments

    Loading discussion…