Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Conway's subprime Fibonacci sequences

Source:Problems from arXiv papers
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

Every subprime Fibonacci sequence starting from two positive integers eventually enters a cycle. This is the "no infinite chains" conjecture recorded in A214897, associated with Guy–Khovanova–Salazar.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.00058 [math.NT] · NS.00058v1 for this version
Declaration:Arxiv.«1207.5099».conjecture
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100; accepted critique: up to 100
Statement hash:179c315113f5c85a9f4bab2dc8a9e8fa326ae3f6931a86533cbdb71cf2bca3da
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/Arxiv/1207.5099/SubprimeFibonacci.lean

Formal statement

theorem conjecture (x y : ℕ) (hx : 0 < x) (hy : 0 < y) : EventuallyPeriodic (x, y)
Show the full Challenge.lean (114 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Conway's subprime Fibonacci sequences

A subprime Fibonacci sequence starts from two positive integers. Each new term is the sum of the
previous two terms if that sum is prime; if the sum is composite, it is divided once by its least
prime factor. This file formalizes the no-infinite-chains component of the conjecture: every such
sequence eventually enters a cycle. It does not assert that the seven known loops are complete or
unique.

*References:*
- R. K. Guy, T. Khovanova, and J. Salazar,
  ["Conway's subprime Fibonacci sequences"](https://arxiv.org/abs/1207.5099),
  *Mathematics Magazine* **87** (2014), no. 5, 323–337.
- [A214897](https://oeis.org/A214897), Conway's subprime Fibonacci sequence: cycle lengths.
-/

@[expose] public section

namespace Arxiv.«1207.5099»

/--
Conway's subprime function leaves a prime unchanged and divides a composite number once by its
least prime factor. It is extended by the identity on $0$ and $1$.
-/
def subprimePart (n : ℕ) : ℕ :=
  if n < 2 then n else if n.Prime then n else n / n.minFac

/--
One step of the subprime Fibonacci recurrence on a pair of consecutive terms. The second entry
becomes the first, and the subprime part of the sum becomes the second.
-/
def step (state : ℕ × ℕ) : ℕ × ℕ :=
  (state.2, subprimePart (state.1 + state.2))

/-- A pair state is eventually periodic if some positive iterate fixes a later state. -/
def EventuallyPeriodic (initial : ℕ × ℕ) : Prop :=
  ∃ preperiod period : ℕ, 0 < period ∧
    Function.IsPeriodicPt step period ((step^[preperiod]) initial)

/-- A prime sum passes unchanged to the next term. -/
@[category API, AMS 11]
theorem subprime_part_of_prime {n : ℕ} (hn : n.Prime) : subprimePart n = n := by
  simp [subprimePart, hn]

@[category test, AMS 11]
theorem subprime_part_zero : subprimePart 0 = 0 := by norm_num [subprimePart]

@[category test, AMS 11]
theorem subprime_part_one : subprimePart 1 = 1 := by norm_num [subprimePart]

@[category test, AMS 11]
theorem subprime_part_prime : subprimePart 13 = 13 := by norm_num [subprimePart]

@[category test, AMS 11]
theorem subprime_part_composite : subprimePart 12 = 6 := by norm_num [subprimePart]

@[category test, AMS 11]
theorem step_zero_one : step (0, 1) = (1, 1) := by norm_num [step, subprimePart]

@[category test, AMS 11]
theorem one_one_not_fixed_point : ¬ Function.IsFixedPt step (1, 1) := by
  norm_num [Function.IsFixedPt, step, subprimePart]

/-- The example from the paper begins $0,1,1,2,3,5,4,3,7$. -/
@[category test, AMS 11]
theorem zero_one_after_seven_steps : (step^[7]) (0, 1) = (3, 7) := by
  norm_num [Function.iterate_succ_apply, step, subprimePart]

/-- The pair $(2,2)$ is the cycle of length one. -/
@[category test, AMS 11]
theorem two_two_fixed_point : Function.IsFixedPt step (2, 2) := by
  norm_num [Function.IsFixedPt, step, subprimePart]

@[category test, AMS 11]
theorem two_two_eventually_periodic : EventuallyPeriodic (2, 2) := by
  refine ⟨0, 1, by norm_num, ?_⟩
  simpa [Function.IsPeriodicPt] using two_two_fixed_point

/-- An 18-step return along the paper's nontrivial cycle through $(13,61)$. -/
@[category test, AMS 11]
theorem thirteen_sixty_one_periodic : (step^[18]) (13, 61) = (13, 61) := by
  norm_num [Function.iterate_succ_apply, step, subprimePart]

/--
Every subprime Fibonacci sequence starting from two positive integers eventually enters a cycle.
This is the "no infinite chains" conjecture recorded in [A214897](https://oeis.org/A214897),
associated with [Guy–Khovanova–Salazar](https://arxiv.org/abs/1207.5099).
-/
@[category research open, AMS 11]
theorem conjecture (x y : ℕ) (hx : 0 < x) (hy : 0 < y) : EventuallyPeriodic (x, y) := by
  sorry

end Arxiv.«1207.5099»

To prove it: keep every definition of Challenge.lean unchanged and prove Arxiv.«1207.5099».conjecture with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry desk arxiv-1207-5099-subprimefibonacci      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch arxiv-1207-5099-subprimefibonacci
nosorry submit arxiv-1207-5099-subprimefibonacci nosorry/arxiv-1207-5099-subprimefibonacci/Solution.lean --wait

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.