{
  "id": "6682",
  "ident": "NS.06682",
  "slug": "oeis-63880",
  "title": "Conjectures associated with A063880",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "All members of the sequence satisfy $n \\equiv 108 \\pmod{216}$.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA63880.mod_216_of_a",
  "statement_lean": "theorem mod_216_of_a {n : ℕ} (h : A n) : n % 216 = 108",
  "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# Conjectures associated with A063880\n\nA063880 lists numbers $n$ such that $\\sigma(n) = 2 \\cdot \\text{usigma}(n)$, where $\\sigma(n)$ is the\nsum of all divisors and $\\text{usigma}(n)$ is the sum of unitary divisors.\n\nEquivalently, these are numbers whose unitary and non-unitary divisors have equal sum.\n\nThe conjectures state that all members satisfy $n \\equiv 108 \\pmod{216}$, and that all\nprimitive terms (those whose proper divisors aren't in the sequence) are powerful numbers,\nwith $108$ being the only primitive term.\n\n*References:*\n- [A063880](https://oeis.org/A063880)\n-/\n\n@[expose] public section\n\nnamespace OeisA63880\n\nopen scoped ArithmeticFunction.sigma\n\n/-- The set of unitary divisors of $n$: divisors $d$ such that $\\gcd(d, n/d) = 1$. -/\ndef unitaryDivisors (n : ℕ) : Finset ℕ :=\n  {d ∈ n.divisors | d.Coprime (n / d)}\n\n/-- The sum of unitary divisors of $n$, denoted $\\text{usigma}(n)$. -/\ndef usigma (n : ℕ) : ℕ :=\n  ∑ d ∈ unitaryDivisors n, d\n\n/-- A number $n$ is in the sequence A063880 if $\\sigma(n) = 2 \\cdot \\text{usigma}(n)$. -/\ndef A (n : ℕ) : Prop :=\n  0 < n ∧ σ 1 n = 2 * usigma n\n\n/-- A term $n$ is primitive if no proper divisor of $n$ is in the sequence. -/\nabbrev IsPrimitiveTerm (n : ℕ) : Prop := {n | A n}.IsPrimitive n\n\n/-- $108$ is in the sequence A063880. -/\n@[category test, AMS 11]\ntheorem a_108 : A 108 := by\n  refine ⟨by norm_num, ?_⟩\n  decide\n\n/-- $540$ is in the sequence A063880. -/\n@[category test, AMS 11]\ntheorem a_540 : A 540 := by\n  refine ⟨by norm_num, ?_⟩\n  decide\n\n/-- $756$ is in the sequence A063880. -/\n@[category test, AMS 11]\ntheorem a_756 : A 756 := by\n  refine ⟨by norm_num, ?_⟩\n  decide\n\n/-- $108$ is a primitive term. -/\n@[category test, AMS 11]\ntheorem isPrimitiveTerm_108 : IsPrimitiveTerm 108 := by\n  rw [IsPrimitiveTerm, Set.isPrimitive_iff]\n  refine ⟨a_108, ?_⟩\n  intro d hd\n  have ⟨hdvd, hlt⟩ := Nat.mem_properDivisors.mp hd\n  interval_cases d <;> simp_all [A] <;> decide\n\n/-- All members of the sequence satisfy $n \\equiv 108 \\pmod{216}$. -/\n@[category research open, AMS 11]\ntheorem mod_216_of_a {n : ℕ} (h : A n) : n % 216 = 108 := by\n  sorry\n\n/-- The unitary divisors of `m * p`, for a prime `p` not dividing `m > 0`, are the unitary\ndivisors of `m` and their multiples by `p`. -/\n@[category API, AMS 11]\ntheorem unitaryDivisors_mul_prime {m p : ℕ} (hm : 0 < m) (hp : p.Prime) (hpm : ¬ p ∣ m) :\n    unitaryDivisors (m * p) =\n      unitaryDivisors m ∪ (unitaryDivisors m).image (· * p) := by\n  have hp0 : 0 < p := hp.pos\n  have hcop : Nat.Coprime p m := (Nat.Prime.coprime_iff_not_dvd hp).2 hpm\n  ext d\n  simp only [unitaryDivisors, Finset.mem_filter, Nat.mem_divisors, Finset.mem_union,\n    Finset.mem_image]\n  constructor\n  · rintro ⟨⟨hd, -⟩, hcd⟩\n    obtain ⟨d₁, d₂, hd₁, hd₂, rfl⟩ := dvd_mul.1 hd\n    obtain ⟨t, rfl⟩ := hd₁\n    have hd₁0 : 0 < d₁ := Nat.pos_of_mul_pos_right hm\n    rcases (Nat.dvd_prime hp).1 hd₂ with h2 | h2 <;> subst d₂\n    · -- `d = d₁` is a unitary divisor of `m`\n      left\n      rw [mul_one] at hcd ⊢\n      have e : d₁ * t * p / d₁ = t * p := by\n        rw [mul_assoc, Nat.mul_div_cancel_left _ hd₁0]\n      rw [e] at hcd\n      refine ⟨⟨dvd_mul_right d₁ t, hm.ne'⟩, ?_⟩\n      rw [Nat.mul_div_cancel_left _ hd₁0]\n      exact (Nat.coprime_mul_iff_right.1 hcd).1\n    · -- `d = d₁ * p`\n      right\n      have e : d₁ * t * p / (d₁ * p) = t := by\n        rw [mul_right_comm, Nat.mul_div_cancel_left _ (Nat.mul_pos hd₁0 hp0)]\n      rw [e] at hcd\n      refine ⟨d₁, ⟨⟨dvd_mul_right d₁ t, hm.ne'⟩, ?_⟩, rfl⟩\n      rw [Nat.mul_div_cancel_left _ hd₁0]\n      exact (Nat.coprime_mul_iff_left.1 hcd).1\n  · rintro (⟨⟨hd, -⟩, hcd⟩ | ⟨d₁, ⟨⟨hd₁, -⟩, hcd⟩, rfl⟩)\n    · obtain ⟨t, rfl⟩ := hd\n      have hd0 : 0 < d := Nat.pos_of_mul_pos_right hm\n      rw [Nat.mul_div_cancel_left _ hd0] at hcd\n      refine ⟨⟨dvd_mul_of_dvd_left (dvd_mul_right d t) p, (Nat.mul_pos hm hp0).ne'⟩, ?_⟩\n      rw [mul_assoc, Nat.mul_div_cancel_left _ hd0]\n      refine Nat.Coprime.mul_right hcd ?_\n      exact ((Nat.Prime.coprime_iff_not_dvd hp).2 fun h => hpm (h.trans (dvd_mul_right d t))).symm\n    · obtain ⟨t, rfl⟩ := hd₁\n      have hd₁0 : 0 < d₁ := Nat.pos_of_mul_pos_right hm\n      rw [Nat.mul_div_cancel_left _ hd₁0] at hcd\n      refine ⟨⟨mul_dvd_mul (dvd_mul_right d₁ t) dvd_rfl, (Nat.mul_pos hm hp0).ne'⟩, ?_⟩\n      rw [show d₁ * t * p / (d₁ * p) = t by\n        rw [mul_right_comm, Nat.mul_div_cancel_left _ (Nat.mul_pos hd₁0 hp0)]]\n      refine Nat.Coprime.mul_left hcd ?_\n      exact (Nat.Prime.coprime_iff_not_dvd hp).2 fun h => hpm (h.trans (dvd_mul_left t d₁))\n\n/-- `usigma` is multiplicative at a prime not dividing the argument. -/\n@[category API, AMS 11]\ntheorem usigma_mul_prime {m p : ℕ} (hm : 0 < m) (hp : p.Prime) (hpm : ¬ p ∣ m) :\n    usigma (m * p) = usigma m * (p + 1) := by\n  have hdisj : Disjoint (unitaryDivisors m) ((unitaryDivisors m).image (· * p)) := by\n    rw [Finset.disjoint_left]\n    intro d hd hd'\n    obtain ⟨d₁, hd₁, rfl⟩ := Finset.mem_image.1 hd'\n    have h1 : d₁ * p ∣ m := (Finset.mem_filter.1 hd).1 |> Nat.mem_divisors.1 |>.1\n    exact hpm ((dvd_mul_left p d₁).trans h1)\n  unfold usigma\n  rw [unitaryDivisors_mul_prime hm hp hpm, Finset.sum_union hdisj,\n    Finset.sum_image (fun a _ b _ h => Nat.eq_of_mul_eq_mul_right hp.pos h), ← Finset.sum_mul,\n    mul_add, mul_one, add_comm]\n\n/-- `σ` is multiplicative at a prime not dividing the argument. -/\n@[category API, AMS 11]\ntheorem sigma_mul_prime {m p : ℕ} (hp : p.Prime) (hpm : ¬ p ∣ m) :\n    σ 1 (m * p) = σ 1 m * (p + 1) := by\n  have hσp : σ 1 p = p + 1 := by\n    have := ArithmeticFunction.sigma_one_apply_prime_pow hp (i := 1)\n    simp [Finset.sum_range_succ] at this\n    omega\n  rw [ArithmeticFunction.isMultiplicative_sigma.map_mul_of_coprime\n    ((Nat.Prime.coprime_iff_not_dvd hp).2 hpm).symm, hσp]\n\n/-- Membership in the sequence is preserved by multiplying with a prime not dividing the term. -/\n@[category API, AMS 11]\ntheorem A_mul_prime {m p : ℕ} (hA : A m) (hp : p.Prime) (hpm : ¬ p ∣ m) : A (m * p) :=\n  ⟨Nat.mul_pos hA.1 hp.pos, by\n    rw [sigma_mul_prime hp hpm, usigma_mul_prime hA.1 hp hpm, hA.2]; ring⟩\n\n/-- Conversely, if `m * p` is in the sequence with `p` a prime not dividing `m > 0`, so is `m`. -/\n@[category API, AMS 11]\ntheorem A_of_mul_prime {m p : ℕ} (hm : 0 < m) (hA : A (m * p)) (hp : p.Prime) (hpm : ¬ p ∣ m) :\n    A m := by\n  refine ⟨hm, ?_⟩\n  have h := hA.2\n  rw [sigma_mul_prime hp hpm, usigma_mul_prime hm hp hpm, ← mul_assoc] at h\n  exact Nat.eq_of_mul_eq_mul_right (by omega) h\n\n/-- Membership in the sequence is preserved by multiplying with a coprime squarefree number. -/\n@[category API, AMS 11]\ntheorem A_mul_of_squarefree (s : ℕ) :\n    ∀ m, A m → Squarefree s → m.Coprime s → A (m * s) := by\n  induction s using Nat.recOnPrimeCoprime with\n  | zero => intro m _ hs; exact absurd hs not_squarefree_zero\n  | prime_pow p n hp =>\n    intro m hA hs hcop\n    have hn : n ≤ 1 := by\n      by_contra hn\n      exact absurd hs ((Nat.squarefree_pow_iff hp.ne_one (by omega)).not.2 (by omega))\n    interval_cases n\n    · simpa using hA\n    · rw [pow_one] at hcop ⊢\n      exact A_mul_prime hA hp ((Nat.Prime.coprime_iff_not_dvd hp).1 hcop.symm)\n  | coprime a b _ _ hab iha ihb =>\n    intro m hA hs hcop\n    rw [← mul_assoc]\n    exact ihb (m * a) (iha m hA hs.of_mul_left (Nat.Coprime.coprime_mul_right_right hcop))\n      hs.of_mul_right (Nat.Coprime.mul_left (Nat.Coprime.coprime_mul_left_right hcop) hab)\n\n/-- All primitive terms are powerful numbers: if `p` divided `n` exactly once, then `n / p` would\nalso be in the sequence. -/\n@[category textbook, AMS 11]\ntheorem powerful_of_isPrimitiveTerm {n : ℕ} (h : IsPrimitiveTerm n) : n.Powerful := by\n  intro p hp\n  by_contra hp2\n  have hpn : p ∣ n := Nat.dvd_of_mem_primeFactors hp\n  have hpp : p.Prime := Nat.prime_of_mem_primeFactors hp\n  have hn : 0 < n := h.mem.1\n  obtain ⟨m, rfl⟩ := hpn\n  have hm : 0 < m := Nat.pos_of_mul_pos_left hn\n  have hpm : ¬ p ∣ m := fun hd => hp2 (by rw [sq]; exact Nat.mul_dvd_mul_left p hd)\n  have hAm : A m := A_of_mul_prime hm (by rw [mul_comm]; exact h.mem) hpp hpm\n  exact h.not_mem_of_dvd_of_lt (dvd_mul_left m p)\n    (by have := hpp.two_le; nlinarith) hAm\n\n/-- $108$ is the only primitive term. -/\n@[category research open, AMS 11]\ntheorem unique_primitive_108 {n : ℕ} (h : IsPrimitiveTerm n) : n = 108 := by\n  sorry\n\n/-- If $m$ is a primitive term and $s$ is squarefree with $\\gcd(m, s) = 1$, then $m \\cdot s$\nis in the sequence. -/\n@[category textbook, AMS 11]\ntheorem a_of_primitive_mul_squarefree (m s : ℕ) (hm : IsPrimitiveTerm m)\n    (hs : Squarefree s) (hcoprime : m.Coprime s) : A (m * s) :=\n  A_mul_of_squarefree s m hm.mem hs hcoprime\n\nset_option linter.style.formal_proof_palomar false in\n/-- Non-primitive terms have the form $m \\cdot s$ where $m$ is primitive and $s$ is\nsquarefree with $\\gcd(m, s) = 1$. -/\n@[category research solved, AMS 11, formal_proof using lean4 at \"https://github.com/anatoliiohorodnyk/lean-fc-proofs/blob/5da9642575b26c2c816a49bcb56b33fed5456619/Proofs/T_OeisA63880_exists_primitive_of_a.lean#L491\"]\ntheorem exists_primitive_of_a {n : ℕ} (h : A n) :\n    ∃ m s, IsPrimitiveTerm m ∧ Squarefree s ∧ m.Coprime s ∧ n = m * s := by\n  sorry\n\nend OeisA63880\n",
  "statement_hash": "8c860facbe9cfba448f7a596ca92a62f782baed734c97eea80ebc2b0229c90a0",
  "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."
}