Title:Numbers such that the perfect deficiency of is .
Statement:Is the last odd number in this sequence? ( is the th term starting from , corresponding to ).
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Tags: | question |
| Cite as: | NS.04618 [math.NT] · NS.04618v1 for this version |
| Declaration: | OeisA108864.conjecture |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60 |
| Statement hash: | ef28b630f7c6c2370106c8286daee4ad374efbdcfcb04558368ac7150e68ce10 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/108864.lean |
Formal statement
theorem conjecture :
∀ n > 58, Even (a n)Show the full Challenge.lean (110 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Numbers $n$ such that the perfect deficiency of $n$ is $\le 10$.
The perfect deficiency of $n$ (A109883) is the remainder after greedily subtracting
from $n$ its divisors in increasing order, skipping any divisor larger than the
current remainder.
*References:*
- [A108864](https://oeis.org/A108864)
- [A109883](https://oeis.org/A109883)
-/
@[expose] public section
namespace OeisA108864
open Nat Finset Int
/--
The perfect deficiency of $n$ (A109883): the remainder after greedily subtracting
from $n$ its divisors in increasing order, skipping any divisor larger than the
current remainder.
-/
def perfectDeficiency (n : ℕ) : ℕ :=
(List.range (n + 1)).foldl (fun m d => if d ∣ n ∧ d ≤ m then m - d else m) n
/--
The condition for a number $n$ to be in the sequence.
It satisfies $0 < n$ and its perfect deficiency is $\le 10$.
-/
def A (n : ℕ) : Prop :=
0 < n ∧ perfectDeficiency n ≤ 10
instance : DecidablePred A := by
unfold A
infer_instance
/--
The primary defining sequence `a`.
$a(n)$ is the $n$-th number (0-indexed) such that its perfect deficiency is $\le 10$.
-/
noncomputable def a (n : ℕ) : ℕ :=
n.nth A
/-- Term theorems verifying the first few values of the sequence against the official OEIS b-file -/
@[category test, AMS 11]
theorem a_0 : a 0 = 1 := by
have h1 : A 1 := by decide
have hcnt : Nat.count A 1 = 0 := by decide
have := Nat.nth_count (p := A) h1
rwa [hcnt] at this
@[category test, AMS 11]
theorem a_1 : a 1 = 2 := by
have h2 : A 2 := by decide
have hcnt : Nat.count A 2 = 1 := by decide
have := Nat.nth_count (p := A) h2
rwa [hcnt] at this
@[category test, AMS 11]
theorem a_2 : a 2 = 3 := by
have h3 : A 3 := by decide
have hcnt : Nat.count A 3 = 2 := by decide
have := Nat.nth_count (p := A) h3
rwa [hcnt] at this
@[category test, AMS 11]
theorem a_3 : a 3 = 4 := by
have h4 : A 4 := by decide
have hcnt : Nat.count A 4 = 3 := by decide
have := Nat.nth_count (p := A) h4
rwa [hcnt] at this
@[category test, AMS 11]
theorem a_4 : a 4 = 5 := by
have h5 : A 5 := by decide
have hcnt : Nat.count A 5 = 4 := by decide
have := Nat.nth_count (p := A) h5
rwa [hcnt] at this
/--
Is $1155$ the last odd number in this sequence?
($1155$ is the $59$th term starting from $1$, corresponding to $a(58) = 1155$).
-/
@[category research open, question, AMS 11]
theorem conjecture :
∀ n > 58, Even (a n) := by
sorry
end OeisA108864
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA108864.conjecture with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch oeis-108864 nosorry submit oeis-108864 nosorry/oeis-108864/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.