{
  "id": "6742",
  "ident": "NS.06742",
  "slug": "oeis-67857",
  "title": "Sum of $a(k)/k!$ over divisors equals harmonic number",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "The terms are not all positive. The first negative one is\n$a(30) = -22690644647302814715858124800000$.\nConjecture: $a(n) < 0$ if and only if A001221(n) is an odd number $\\ge 3$.\n\nThis conjecture is false. A counterexample is the product of all primes at most $1000$,\nwhich has $168$ distinct prime factors and a negative sequence value.\n\nThe counterexample and formal proof were developed by Codex (GPT-6),\nprompted by Samuel Schlesinger.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA67857.conjecture",
  "statement_lean": "theorem conjecture :\n    ¬ ∀ n : ℕ, 0 < n →\n      (a n < 0 ↔ Odd (cardDistinctFactors n) ∧ 3 ≤ cardDistinctFactors 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/-!\n# Sum of $a(k)/k!$ over divisors equals harmonic number\n\nThe sequence $a(n)$ satisfies $\\sum_{k \\mid n} \\frac{a(k)}{k!} = \\sum_{j=1}^n \\frac{1}{j} = H_n$,\nwhere the sum on the left is over positive divisors $k$ of $n$. By Möbius inversion,\n$$a(n) = n! \\sum_{d \\mid n} \\mu(n/d) H_d$$\nwhere $H_d = \\sum_{j=1}^d \\frac{1}{j}$ is the $d$-th harmonic number.\n\n*References:*\n- [A067857](https://oeis.org/A067857)\n- [A001221](https://oeis.org/A001221)\n-/\n\n@[expose] public section\n\nnamespace OeisA67857\n\nopen ArithmeticFunction Finset\n\n/-- The sequence $a(n) = n! \\sum_{d \\mid n} \\mu(n/d) H_d$ for $n \\ge 1$, and $a(0) = 0$. -/\ndef a (n : ℕ) : ℚ :=\n  if n = 0 then 0\n  else\n    (n.factorial : ℚ) *\n      ∑ d ∈ n.divisors, ((moebius (n / d) : ℤ) : ℚ) * harmonic d\n\n/-- Value of the sequence `a` at 1. -/\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 1 := by\n  decide +kernel\n\n/-- Value of the sequence `a` at 2. -/\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 1 := by\n  decide +kernel\n\n/-- Value of the sequence `a` at 3. -/\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 5 := by\n  decide +kernel\n\n/-- Value of the sequence `a` at 4. -/\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 14 := by\n  decide +kernel\n\n/-- Value of the sequence `a` at 5. -/\n@[category test, AMS 11]\ntheorem a_5 : a 5 = 154 := by\n  decide +kernel\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe terms are not all positive. The first negative one is\n$a(30) = -22690644647302814715858124800000$.\nConjecture: $a(n) < 0$ if and only if A001221(n) is an odd number $\\ge 3$.\n\nThis conjecture is false. A counterexample is the product of all primes at most $1000$,\nwhich has $168$ distinct prime factors and a negative sequence value.\n\nThe counterexample and formal proof were developed by Codex (GPT-6),\nprompted by Samuel Schlesinger.\n-/\n@[category research solved, question, AMS 11, formal_proof using lean4 at\n  \"https://github.com/SamuelSchlesinger/a067857-counterexample/blob/44317ddb5bd735f7a1f6764c22db10c455e4b584/Counterexample.lean#L89-L92\"]\ntheorem conjecture :\n    ¬ ∀ n : ℕ, 0 < n →\n      (a n < 0 ↔ Odd (cardDistinctFactors n) ∧ 3 ≤ cardDistinctFactors n) := by\n  sorry\n\nend OeisA67857\n",
  "statement_hash": "a0058a558e9948bd1d5bed57d8bf70f02a5e1f90d105c1d60ed1a65a4994c497",
  "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."
}