{
  "id": "6967",
  "ident": "NS.06967",
  "slug": "oeis-92243",
  "title": "Tug of war score between prime gap increases and decreases",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Is the score $a(n) > 0$ for some $n > 250000$?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA92243.conjecture1",
  "statement_lean": "theorem conjecture1 : ∃ n > 250000, a n > 0",
  "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# Tug of war score between prime gap increases and decreases\n\nScore at stage $n$ in \"tug of war\" between prime gap increases vs. prime gap decreases:\nstart with score $= 0$ at $n = 1$ and at stage $k > 1$, increase (resp. decrease) the score by $1$\nif the $k$-th prime gap is greater (resp. less) than the previous prime gap.\n\n*References:*\n- [A092243](https://oeis.org/A092243)-/\n\n@[expose] public section\n\nnamespace OeisA92243\n\n/-- The $n$-th prime gap $g(n) = p_n - p_{n-1}$ for $n \\ge 1$,\nwhere $p_i$ is the $i$-th prime (0-indexed). -/\nnoncomputable def primeGap (n : ℕ) : ℕ :=\n  Nat.nth Nat.Prime n - Nat.nth Nat.Prime (n - 1)\n\n/-- Score at stage $n$ in \"tug of war\" between prime gap increases vs. prime gap decreases. -/\nnoncomputable def a (n : ℕ) : ℤ :=\n  if n ≤ 1 then 0\n  else\n    ∑ k ∈ Finset.Icc 2 n,\n      ((primeGap k : ℤ) - (primeGap (k - 1) : ℤ)).sign\n\n/-- Value of the sequence `a` at 0. -/\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 0 := by rfl\n\n/-- Value of the sequence `a` at 1. -/\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 0 := by rfl\n\n/-- Value of the sequence `a` at 2. -/\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 1 := by\n  unfold a\n  have h2 : ¬ 2 ≤ 1 := by decide\n  rw [if_neg h2]\n  have h_icc : Finset.Icc 2 2 = {2} := by decide\n  rw [h_icc, Finset.sum_singleton]\n  unfold primeGap\n  have h_zero : Nat.nth Nat.Prime 0 = 2 := Nat.nth_prime_zero_eq_two\n  have h_one : Nat.nth Nat.Prime 1 = 3 := Nat.nth_prime_one_eq_three\n  have h_two : Nat.nth Nat.Prime 2 = 5 := Nat.nth_prime_two_eq_five\n  rw [h_zero, h_one, h_two]\n  decide\n\n/-- Value of the sequence `a` at 3. -/\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 1 := by\n  unfold a\n  have h3 : ¬ 3 ≤ 1 := by decide\n  rw [if_neg h3]\n  have h_icc : Finset.Icc 2 3 = {2, 3} := by decide\n  rw [h_icc, Finset.sum_pair (by decide)]\n  unfold primeGap\n  have h_zero : Nat.nth Nat.Prime 0 = 2 := Nat.nth_prime_zero_eq_two\n  have h_one : Nat.nth Nat.Prime 1 = 3 := Nat.nth_prime_one_eq_three\n  have h_two : Nat.nth Nat.Prime 2 = 5 := Nat.nth_prime_two_eq_five\n  have h_three : Nat.nth Nat.Prime 3 = 7 := Nat.nth_prime_three_eq_seven\n  rw [h_zero, h_one, h_two, h_three]\n  decide\n\n/--\nIs the score $a(n) > 0$ for some $n > 250000$?-/\n@[category research open, question, AMS 11]\ntheorem conjecture1 : ∃ n > 250000, a n > 0 := by\n  sorry\n\n/--\nIs the score $a(n)$ bounded from below?-/\n@[category research open, question, AMS 11]\ntheorem conjecture2 : ∃ B : ℤ, ∀ n : ℕ, B ≤ a n := by\n  sorry\n\n/--\nIs the score $a(n)$ bounded from above?-/\n@[category research open, question, AMS 11]\ntheorem conjecture3 : ∃ B : ℤ, ∀ n : ℕ, a n ≤ B := by\n  sorry\n\n/--\nIs the score $a(n) > 0$ for infinitely many values of $n$?-/\n@[category research open, question, AMS 11]\ntheorem conjecture4 : Set.Infinite {n : ℕ | a n > 0} := by\n  sorry\n\n/--\nIs the score $a(n) < 0$ for infinitely many values of $n$?-/\n@[category research open, question, AMS 11]\ntheorem conjecture5 : Set.Infinite {n : ℕ | a n < 0} := by\n  sorry\n\nend OeisA92243\n",
  "statement_hash": "e22221cf29ff6c02b04292dc4543f3e86377990d5fd3e735c7a5e7a75e428bab",
  "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."
}