{
  "id": "4520",
  "ident": "NS.04520",
  "slug": "oeis-105020",
  "title": "Array read by upward antidiagonals",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "A \"Goldbach Conjecture\" for this sequence: when there are $n$ terms between consecutive odd\nintegers $2n+1$ and $2n+3$ for $n > 0$, at least one will be the product of 2 primes\n(not necessarily distinct). Example: $n=3$ for consecutive odd integers $a(7) = 7$ and\n$a(11) = 9$ and of the 3 sequence entries $a(8) = 12$, $a(9) = 15$ and $a(10) = 16$ between\nthem, one is the product of 2 primes $a(9) = 15=3*5$. - _Michael Hiebl_, Jul 15 2007",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA105020.conjecture",
  "statement_lean": "theorem conjecture :\n  ∀ (n i j : ℕ), 1 ≤ n →\n    a i = 2 * n + 1 →\n    a j = 2 * n + 3 →\n    j = i + n + 1 →\n    ∃ (k : ℕ),\n      i < k ∧\n      k < j ∧\n      (a k).IsSemiprime",
  "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# Array read by upward antidiagonals\n\nArray read by upward antidiagonals: row $n$ ($n \\ge 0$) contains the numbers\n$m^2 - n^2$, $m \\ge n+1$.\n\n*References:*\n- [A105020](https://oeis.org/A105020)\n-/\n\n@[expose] public section\n\nnamespace OeisA105020\n\n/--\nTriangular number $T_c = c(c+1)/2$.\n-/\ndef triangularNumber (c : ℕ) : ℕ := Nat.choose (c + 1) 2\n\n/--\nThe index $c$ of the antidiagonal containing $n$, i.e., the largest $c$ such that $T_c \\le n$.\nThis is derived from $c = \\lfloor (\\sqrt{8n+1} - 1) / 2 \\rfloor$.\n-/\ndef antidiagonalIndex (n : ℕ) : ℕ :=\n  (Nat.sqrt (8 * n + 1) - 1) / 2\n\n/-- The primary defining sequence `a`.\nArray read by upward antidiagonals: row $n$ ($n \\ge 0$) contains the numbers\n$m^2 - n^2$, $m \\ge n+1$.\nThe array entry $T(i, j)$ is $(i+j+1)^2 - i^2$.\nThe sequence $a(n)$ is generated by reading $T(i, j)$ for $i+j=c$,\nwith $i$ decreasing from $c$ to $0$.\n-/\ndef a (n : ℕ) : ℕ :=\n  let c := antidiagonalIndex n\n  let k := n - triangularNumber c\n  let i := c - k\n  let m := c + 1\n  m^2 - i^2\n\n/-- Term theorems verifying the first few values of the sequence against the official OEIS b-file -/\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 1 := by\n  unfold a antidiagonalIndex triangularNumber\n  norm_num\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 3 := by\n  unfold a antidiagonalIndex triangularNumber\n  norm_num\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 4 := by\n  unfold a antidiagonalIndex triangularNumber\n  norm_num\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 5 := by\n  unfold a antidiagonalIndex triangularNumber\n  norm_num\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 8 := by\n  unfold a antidiagonalIndex triangularNumber\n  norm_num\n\n/--\nA \"Goldbach Conjecture\" for this sequence: when there are $n$ terms between consecutive odd\nintegers $2n+1$ and $2n+3$ for $n > 0$, at least one will be the product of 2 primes\n(not necessarily distinct). Example: $n=3$ for consecutive odd integers $a(7) = 7$ and\n$a(11) = 9$ and of the 3 sequence entries $a(8) = 12$, $a(9) = 15$ and $a(10) = 16$ between\nthem, one is the product of 2 primes $a(9) = 15=3*5$. - _Michael Hiebl_, Jul 15 2007\n-/\n@[category research open, AMS 11]\ntheorem conjecture :\n  ∀ (n i j : ℕ), 1 ≤ n →\n    a i = 2 * n + 1 →\n    a j = 2 * n + 3 →\n    j = i + n + 1 →\n    ∃ (k : ℕ),\n      i < k ∧\n      k < j ∧\n      (a k).IsSemiprime := by\n  sorry\n\nend OeisA105020\n",
  "statement_hash": "54f59bb76a8c5d23a13e97bde083384c958ead4fa4e8e34a7b1102824ca9086b",
  "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."
}