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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Number of parts in the symmetric representation of σ(n)\sigma(n) · conjecture_4

Source:OEIS conjectures
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Conjecture 4: "a(A000290(n)) is odd." - Omar E. Pol, Oct 21 2025

That is, the number of parts in the symmetric representation of σ(n2)\sigma(n^2) is always odd.

Subjects:Number Theory (math.NT)
MSC classes:11
Tags:formal_proof
Cite as:NS.05724 [math.NT] · NS.05724v1 for this version
Declaration:OeisA237271.conjecture_4
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:c2335e28e589179b82d2627d9e50e08d4bf7616e5ba5a2de88563b3588ca13ac
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/237271.lean

Formal statement

theorem conjecture_4 (n : ℕ) (hn : 0 < n) : Odd (a (n ^ 2))
Show the full Challenge.lean (213 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Number of parts in the symmetric representation of $\sigma(n)$

Number of parts in the symmetric representation of $\sigma(n)$. $a(n)$ is $1$ plus the number of pairs $(d_k, d_{k+1})$ of consecutive divisors of $n$
such that $d_{k+1}$ is odd and $d_{k+1} \ge 2 d_k$.

The formula used is
$1 + |\{(d_k, d_{k+1}) \in \text{consecutive pairs of divisors of } n \mid
d_{k+1} \text{ is odd and } d_{k+1} \ge 2 d_k\}|$,
which is a known characterization of the sequence.

*References:*
- [A237271](https://oeis.org/A237271)
- [arxiv/2605.22763](https://arxiv.org/abs/2605.22763) *Advancing Mathematics Research with AI-Driven Formal Proof Search* by George Tsoukalas et al.
-/

@[expose] public section

namespace OeisA237271


open Nat Finset List

/--
Number of parts in the symmetric representation of $\sigma(n)$. $a(n)$ is $1$ plus the number of pairs $(d_k, d_{k+1})$ of consecutive divisors of $n$
such that $d_{k+1}$ is odd and $d_{k+1} \ge 2 d_k$.

The formula used is
$1 + |\{(d_k, d_{k+1}) \in \text{consecutive pairs of divisors of } n \mid
d_{k+1} \text{ is odd and } d_{k+1} \ge 2 d_k\}|$,
which is a known characterization of the sequence.
-/
def a (n : ℕ) : ℕ :=
  -- Get the list of divisors of n, sorted ascendingly.
  let divs_list : List ℕ := (n.divisors.sort (· ≤ ·))

  -- Get the list of consecutive pairs of divisors: [(d₁, d₂), (d₂, d₃), ...]
  let consecutive_pairs : List (ℕ × ℕ) := List.zip divs_list divs_list.tail

  -- Count the pairs satisfying the condition
  let count : ℕ := consecutive_pairs.countP fun pair =>
    let d_k := pair.fst
    let d_k_succ := pair.snd
    -- The second divisor d_{k+1} must be odd and at least twice the first divisor d_k.
    Odd d_k_succ ∧ d_k_succ ≥ 2 * d_k

  -- The sequence value is 1 + the count
  1 + count

def sortedDivisorsList (n : ℕ) : List ℕ := (n.divisors.sort (· ≤ ·))

/--
Number of maximal contiguous sublists of divisors of n where each adjacent pair (d_k, d_{k+1})
satisfies d_{k+1} <= 2 * d_k.
This is 1 + the number of "jumps" where d_{k+1} > 2 * d_k.
-/
def num2DenseSublists (n : ℕ) : ℕ :=
  let divs_list := sortedDivisorsList n
  let consecutive_pairs : List (ℕ × ℕ) := List.zip divs_list divs_list.tail

  -- A jump/break occurs when d_{k+1} > 2 * d_k
  let num_jumps : ℕ := consecutive_pairs.countP fun pair =>
    let d_k := pair.fst
    let d_k_succ := pair.snd
    d_k_succ > 2 * d_k

  1 + num_jumps


@[category test, AMS 11]
lemma a_1 : a 1 = 1 := by native_decide

@[category test, AMS 11]
lemma a_2 : a 2 = 1 := by native_decide

@[category test, AMS 11]
lemma a_3 : a 3 = 2 := by native_decide

@[category test, AMS 11]
lemma a_4 : a 4 = 1 := by native_decide

@[category test, AMS 11]
lemma a_5 : a 5 = 2 := by native_decide


set_option linter.style.formal_proof_palomar false in
/--
Conjecture 2: "a(n) is the number of 2-dense sublists of divisors of n.
We call '2-dense sublists of divisors of n' to the maximal sublists of divisors of n whose terms
increase by a factor of at most 2." - _Omar E. Pol_, Jul 31 2025

A formal proof has been found with the methods described in
[arxiv/2605.22763](https://arxiv.org/abs/2605.22763).
-/
@[category research solved, AMS 11, formal_proof using formal_conjectures at
"https://github.com/mo271/formal-conjectures/blob/a32396489dcb8f86c3549b93aa358ac6a10a3a1f/FormalConjectures/OEIS/237271.wip.lean#L102"]
theorem conjecture_2 (n : ℕ) : a n = num2DenseSublists n := by
    sorry

/-- Number of odd divisors of n (A001227). -/
def A001227 (n : ℕ) : ℕ := (n.divisors.filter Odd).card

/-- Number of odd divisors m of n such that there is a divisor d of n with d < m < 2*d (A239657). -/
def A239657 (n : ℕ) : ℕ :=
  (n.divisors.filter fun m => Odd m ∧ ∃ d ∈ n.divisors, d < m ∧ m < 2 * d).card

set_option linter.style.formal_proof_palomar false in
/--
Conjecture 1 / Theorem: "a(n) is the number of odd divisors of n except the 'e' odd
divisors described in A005279." - _Omar E. Pol_, Dec 21 2024.
"The conjecture 1 is true. For a proof see A379288." - _Hartmut F. W. Hoft_, Jan 21 2025.
Equivalently, $a(n) = \text{A001227}(n) - \text{A239657}(n)$. - _Omar E. Pol_, Mar 23 2014
-/
@[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/anatoliiohorodnyk/lean-fc-proofs/blob/5da9642575b26c2c816a49bcb56b33fed5456619/Proofs/T_OeisA237271_conjecture_1.lean#L211"]
theorem conjecture_1 (n : ℕ) (hn : 0 < n) :
    a n = A001227 n - A239657 n := by
  sorry

set_option linter.style.formal_proof_palomar false in
/--
Theorem: "a(p^k) = k + 1, where p is an odd prime and k >= 0."
- _Hartmut F. W. Hoft_, Dec 26 2016
-/
@[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/anatoliiohorodnyk/lean-fc-proofs/blob/5da9642575b26c2c816a49bcb56b33fed5456619/Proofs/T_OeisA237271_a_odd_prime_pow.lean#L165"]
theorem a_odd_prime_pow (p k : ℕ) (hp : p.Prime) (ho : Odd p) :
    a (p ^ k) = k + 1 := by
  sorry

/--
Conjecture 3: "a(n) is the number of divisors p of n such that p is greater than
twice the adjacent previous divisor of n. The divisors p give the n-th row of A379288."
- _Omar E. Pol_, Aug 02 2025

Note: this is equivalent to `a_eq_num2DenseSublists` (Conjecture 2), since the divisors that
start a new 2-dense sublist are exactly those greater than twice their predecessor (plus the
smallest divisor).
-/
@[category research solved, AMS 11]
theorem conjecture_3 (n : ℕ) :
    a n = 1 + ((sortedDivisorsList n).zip (sortedDivisorsList n).tail).countP
      fun pair => pair.snd > 2 * pair.fst :=
  conjecture_2 n

set_option linter.style.formal_proof_palomar false in
/--
Conjecture 4: "a(A000290(n)) is odd." - _Omar E. Pol_, Oct 21 2025

That is, the number of parts in the symmetric representation of $\sigma(n^2)$ is always odd.
-/
@[category research solved, AMS 11,
  formal_proof using lean4 at
    "https://github.com/KitaKen1/oeis-a237271-square-hexagonal-parity/blob/430c09114d4ad3a3a2654b9816c8bfdc3cdf38de/lean/OeisA237271ParityFC.lean#L19-L24"]
theorem conjecture_4 (n : ℕ) (hn : 0 < n) : Odd (a (n ^ 2)) := by
  sorry

set_option linter.style.formal_proof_palomar false in
/--
Conjecture 5: "a(A000384(n)) is odd." - _Omar E. Pol_, Oct 21 2025

That is, the number of parts in the symmetric representation of $\sigma(n(2n-1))$ is always odd,
where $n(2n-1)$ is the $n$-th hexagonal number.
-/
@[category research solved, AMS 11,
  formal_proof using lean4 at
    "https://github.com/KitaKen1/oeis-a237271-square-hexagonal-parity/blob/430c09114d4ad3a3a2654b9816c8bfdc3cdf38de/lean/OeisA237271ParityFC.lean#L26-L32"]
theorem conjecture_5 (n : ℕ) (hn : 0 < n) : Odd (a (n * (2 * n - 1))) := by
  sorry

set_option linter.style.formal_proof_palomar false in
/--
Observation: "a(A002997(n)) >= 3, at least for 1 <= n <= 10000."
- _Omar E. Pol_, Oct 21 2025

That is, $a(k) \ge 3$ for every Carmichael number $k$.
A002997 is the sequence of Carmichael numbers: the composite numbers $k$ such that
$b^{k-1} \equiv 1 \pmod k$ for every $b$ coprime to $k$. This is `IsCarmichael`,
which also forces $k$ to be composite.

The observation holds for every odd composite $k$, so in particular for every Carmichael
number. Write $p$ for the least prime factor of $k$ and $q = k/p$. The two smallest divisors
of $k$ are $1$ and $p$, and the two largest are $q$ and $k$, so $(1, p)$ and $(q, k)$ are both
consecutive pairs in the sorted divisor list, and they are distinct because $1 < q$. Both
qualify: $p$ and $k$ are odd, $p \ge 2 \cdot 1$, and $k = pq \ge 3q > 2q$. Hence the count is
at least $2$ and $a(k) \ge 3$. A Carmichael number is odd: it is composite by the $b = 1$ case
of `IsCarmichael`, so $k > 2$, and if $k$ were even then the coprime base $k - 1 \equiv -1$
would give $k \mid (-1)^{k-1} - 1 = -2$.
-/
@[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/anatoliiohorodnyk/lean-fc-proofs/blob/5da9642575b26c2c816a49bcb56b33fed5456619/Proofs/T_OeisA237271_observation_carmichael.lean#L260"]
theorem observation_carmichael (k : ℕ) (hk : IsCarmichael k) :
    3 ≤ a k := by
  sorry

end OeisA237271

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

nosorry fetch oeis-237271--conjecture-4
nosorry submit oeis-237271--conjecture-4 nosorry/oeis-237271--conjecture-4/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.