{
  "id": "6698",
  "ident": "NS.06698",
  "slug": "oeis-64169",
  "title": "Numerator - denominator in $n$-th harmonic number",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "\"Conjecture: for $n > 2$, $n$ divides $a(n-2)$ if and only if $n$ is a prime.\nChecked up to 20000. - _Amiram Eldar_ and _Thomas Ordowski_, Jul 27 2019\n\nThis is false for the composite number $16843^2$.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA64169.conjecture",
  "statement_lean": "theorem conjecture : ¬ ∀ (n : ℕ), 2 < n → ((n : ℤ) ∣ a (n - 2) ↔ n.Prime)",
  "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# Numerator - denominator in $n$-th harmonic number\n\n$a(n) = \\text{numerator}(H_n) - \\text{denominator}(H_n)$, where\n$H_n = 1 + 1/2 + \\dots + 1/n$.\n\n*References:*\n- [A064169](https://oeis.org/A064169)-/\n\n@[expose] public section\n\nnamespace OeisA64169\n\n/-- The $n$-th harmonic number $H_n = \\sum_{k=1}^n \\frac{1}{k}$ as a rational number. -/\ndef H (n : ℕ) : ℚ :=\n  ∑ k ∈ Finset.Icc 1 n, 1 / (k : ℚ)\n\n/-- $a(n) = \\text{numerator}(H_n) - \\text{denominator}(H_n)$. -/\ndef a (n : ℕ) : ℤ :=\n  (H n).num - (H n).den\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 0 := by\n  decide +native\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 1 := by\n  decide +native\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 5 := by\n  decide +native\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 13 := by\n  decide +native\n\n@[category test, AMS 11]\ntheorem a_5 : a 5 = 77 := by\n  decide +native\n\nset_option linter.style.formal_proof_palomar false in\n/--\n\"Conjecture: for $n > 2$, $n$ divides $a(n-2)$ if and only if $n$ is a prime.\nChecked up to 20000. - _Amiram Eldar_ and _Thomas Ordowski_, Jul 27 2019\n\nThis is false for the composite number $16843^2$.-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at \"https://github.com/epoch-research/LeanOpenProblems-results/blob/f02efd9a8c5fc6a735d2a90c33e24f7278ce0ffc/runs/oeis-full-50usd-ant-j0j0g4uzligm1k41/oeis_64169_conjecture_0/Submission/Spec.lean#L514\"]\ntheorem conjecture : ¬ ∀ (n : ℕ), 2 < n → ((n : ℤ) ∣ a (n - 2) ↔ n.Prime) := by\n  sorry\n\nend OeisA64169\n",
  "statement_hash": "ba078f6b85675f6aee9bd727b15996a0adccc402d506057318556e56a376cbff",
  "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."
}