{
  "id": "5720",
  "ident": "NS.05720",
  "slug": "oeis-237271",
  "title": "Number of parts in the symmetric representation of $\\sigma(n)$",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Conjecture 2: \"a(n) is the number of 2-dense sublists of divisors of n.\nWe call '2-dense sublists of divisors of n' to the maximal sublists of divisors of n whose terms\nincrease by a factor of at most 2.\" - _Omar E. Pol_, Jul 31 2025\n\nA formal proof has been found with the methods described in\n[arxiv/2605.22763](https://arxiv.org/abs/2605.22763).",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA237271.conjecture_2",
  "statement_lean": "theorem conjecture_2 (n : ℕ) : a n = num2DenseSublists n",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Number of parts in the symmetric representation of $\\sigma(n)$\n\nNumber 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$\nsuch that $d_{k+1}$ is odd and $d_{k+1} \\ge 2 d_k$.\n\nThe formula used is\n$1 + |\\{(d_k, d_{k+1}) \\in \\text{consecutive pairs of divisors of } n \\mid\nd_{k+1} \\text{ is odd and } d_{k+1} \\ge 2 d_k\\}|$,\nwhich is a known characterization of the sequence.\n\n*References:*\n- [A237271](https://oeis.org/A237271)\n- [arxiv/2605.22763](https://arxiv.org/abs/2605.22763) *Advancing Mathematics Research with AI-Driven Formal Proof Search* by George Tsoukalas et al.\n-/\n\n@[expose] public section\n\nnamespace OeisA237271\n\n\nopen Nat Finset List\n\n/--\nNumber 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$\nsuch that $d_{k+1}$ is odd and $d_{k+1} \\ge 2 d_k$.\n\nThe formula used is\n$1 + |\\{(d_k, d_{k+1}) \\in \\text{consecutive pairs of divisors of } n \\mid\nd_{k+1} \\text{ is odd and } d_{k+1} \\ge 2 d_k\\}|$,\nwhich is a known characterization of the sequence.\n-/\ndef a (n : ℕ) : ℕ :=\n  -- Get the list of divisors of n, sorted ascendingly.\n  let divs_list : List ℕ := (n.divisors.sort (· ≤ ·))\n\n  -- Get the list of consecutive pairs of divisors: [(d₁, d₂), (d₂, d₃), ...]\n  let consecutive_pairs : List (ℕ × ℕ) := List.zip divs_list divs_list.tail\n\n  -- Count the pairs satisfying the condition\n  let count : ℕ := consecutive_pairs.countP fun pair =>\n    let d_k := pair.fst\n    let d_k_succ := pair.snd\n    -- The second divisor d_{k+1} must be odd and at least twice the first divisor d_k.\n    Odd d_k_succ ∧ d_k_succ ≥ 2 * d_k\n\n  -- The sequence value is 1 + the count\n  1 + count\n\ndef sortedDivisorsList (n : ℕ) : List ℕ := (n.divisors.sort (· ≤ ·))\n\n/--\nNumber of maximal contiguous sublists of divisors of n where each adjacent pair (d_k, d_{k+1})\nsatisfies d_{k+1} <= 2 * d_k.\nThis is 1 + the number of \"jumps\" where d_{k+1} > 2 * d_k.\n-/\ndef num2DenseSublists (n : ℕ) : ℕ :=\n  let divs_list := sortedDivisorsList n\n  let consecutive_pairs : List (ℕ × ℕ) := List.zip divs_list divs_list.tail\n\n  -- A jump/break occurs when d_{k+1} > 2 * d_k\n  let num_jumps : ℕ := consecutive_pairs.countP fun pair =>\n    let d_k := pair.fst\n    let d_k_succ := pair.snd\n    d_k_succ > 2 * d_k\n\n  1 + num_jumps\n\n\n@[category test, AMS 11]\nlemma a_1 : a 1 = 1 := by native_decide\n\n@[category test, AMS 11]\nlemma a_2 : a 2 = 1 := by native_decide\n\n@[category test, AMS 11]\nlemma a_3 : a 3 = 2 := by native_decide\n\n@[category test, AMS 11]\nlemma a_4 : a 4 = 1 := by native_decide\n\n@[category test, AMS 11]\nlemma a_5 : a 5 = 2 := by native_decide\n\n\nset_option linter.style.formal_proof_palomar false in\n/--\nConjecture 2: \"a(n) is the number of 2-dense sublists of divisors of n.\nWe call '2-dense sublists of divisors of n' to the maximal sublists of divisors of n whose terms\nincrease by a factor of at most 2.\" - _Omar E. Pol_, Jul 31 2025\n\nA formal proof has been found with the methods described in\n[arxiv/2605.22763](https://arxiv.org/abs/2605.22763).\n-/\n@[category research solved, AMS 11, formal_proof using formal_conjectures at\n\"https://github.com/mo271/formal-conjectures/blob/a32396489dcb8f86c3549b93aa358ac6a10a3a1f/FormalConjectures/OEIS/237271.wip.lean#L102\"]\ntheorem conjecture_2 (n : ℕ) : a n = num2DenseSublists n := by\n    sorry\n\n/-- Number of odd divisors of n (A001227). -/\ndef A001227 (n : ℕ) : ℕ := (n.divisors.filter Odd).card\n\n/-- Number of odd divisors m of n such that there is a divisor d of n with d < m < 2*d (A239657). -/\ndef A239657 (n : ℕ) : ℕ :=\n  (n.divisors.filter fun m => Odd m ∧ ∃ d ∈ n.divisors, d < m ∧ m < 2 * d).card\n\nset_option linter.style.formal_proof_palomar false in\n/--\nConjecture 1 / Theorem: \"a(n) is the number of odd divisors of n except the 'e' odd\ndivisors described in A005279.\" - _Omar E. Pol_, Dec 21 2024.\n\"The conjecture 1 is true. For a proof see A379288.\" - _Hartmut F. W. Hoft_, Jan 21 2025.\nEquivalently, $a(n) = \\text{A001227}(n) - \\text{A239657}(n)$. - _Omar E. Pol_, Mar 23 2014\n-/\n@[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\"]\ntheorem conjecture_1 (n : ℕ) (hn : 0 < n) :\n    a n = A001227 n - A239657 n := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nTheorem: \"a(p^k) = k + 1, where p is an odd prime and k >= 0.\"\n- _Hartmut F. W. Hoft_, Dec 26 2016\n-/\n@[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\"]\ntheorem a_odd_prime_pow (p k : ℕ) (hp : p.Prime) (ho : Odd p) :\n    a (p ^ k) = k + 1 := by\n  sorry\n\n/--\nConjecture 3: \"a(n) is the number of divisors p of n such that p is greater than\ntwice the adjacent previous divisor of n. The divisors p give the n-th row of A379288.\"\n- _Omar E. Pol_, Aug 02 2025\n\nNote: this is equivalent to `a_eq_num2DenseSublists` (Conjecture 2), since the divisors that\nstart a new 2-dense sublist are exactly those greater than twice their predecessor (plus the\nsmallest divisor).\n-/\n@[category research solved, AMS 11]\ntheorem conjecture_3 (n : ℕ) :\n    a n = 1 + ((sortedDivisorsList n).zip (sortedDivisorsList n).tail).countP\n      fun pair => pair.snd > 2 * pair.fst :=\n  conjecture_2 n\n\nset_option linter.style.formal_proof_palomar false in\n/--\nConjecture 4: \"a(A000290(n)) is odd.\" - _Omar E. Pol_, Oct 21 2025\n\nThat is, the number of parts in the symmetric representation of $\\sigma(n^2)$ is always odd.\n-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at\n    \"https://github.com/KitaKen1/oeis-a237271-square-hexagonal-parity/blob/430c09114d4ad3a3a2654b9816c8bfdc3cdf38de/lean/OeisA237271ParityFC.lean#L19-L24\"]\ntheorem conjecture_4 (n : ℕ) (hn : 0 < n) : Odd (a (n ^ 2)) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nConjecture 5: \"a(A000384(n)) is odd.\" - _Omar E. Pol_, Oct 21 2025\n\nThat is, the number of parts in the symmetric representation of $\\sigma(n(2n-1))$ is always odd,\nwhere $n(2n-1)$ is the $n$-th hexagonal number.\n-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at\n    \"https://github.com/KitaKen1/oeis-a237271-square-hexagonal-parity/blob/430c09114d4ad3a3a2654b9816c8bfdc3cdf38de/lean/OeisA237271ParityFC.lean#L26-L32\"]\ntheorem conjecture_5 (n : ℕ) (hn : 0 < n) : Odd (a (n * (2 * n - 1))) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nObservation: \"a(A002997(n)) >= 3, at least for 1 <= n <= 10000.\"\n- _Omar E. Pol_, Oct 21 2025\n\nThat is, $a(k) \\ge 3$ for every Carmichael number $k$.\nA002997 is the sequence of Carmichael numbers: the composite numbers $k$ such that\n$b^{k-1} \\equiv 1 \\pmod k$ for every $b$ coprime to $k$. This is `IsCarmichael`,\nwhich also forces $k$ to be composite.\n\nThe observation holds for every odd composite $k$, so in particular for every Carmichael\nnumber. Write $p$ for the least prime factor of $k$ and $q = k/p$. The two smallest divisors\nof $k$ are $1$ and $p$, and the two largest are $q$ and $k$, so $(1, p)$ and $(q, k)$ are both\nconsecutive pairs in the sorted divisor list, and they are distinct because $1 < q$. Both\nqualify: $p$ and $k$ are odd, $p \\ge 2 \\cdot 1$, and $k = pq \\ge 3q > 2q$. Hence the count is\nat least $2$ and $a(k) \\ge 3$. A Carmichael number is odd: it is composite by the $b = 1$ case\nof `IsCarmichael`, so $k > 2$, and if $k$ were even then the coprime base $k - 1 \\equiv -1$\nwould give $k \\mid (-1)^{k-1} - 1 = -2$.\n-/\n@[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\"]\ntheorem observation_carmichael (k : ℕ) (hk : IsCarmichael k) :\n    3 ≤ a k := by\n  sorry\n\nend OeisA237271\n",
  "statement_hash": "c2335e28e589179b82d2627d9e50e08d4bf7616e5ba5a2de88563b3588ca13ac",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}