A006702: Solution to a Pellian equation: least x such that x^2 - n*y^2 = +- 1.
Statement
Apparently the generating function of the sequence of the denominators of continued fraction convergents to sqrt(n) is always rational and of form p(x)/[1 - C*x^m + (-1)^m * x^(2m)], or equivalently, the denominators satisfy the linear recurrence b(n+2m) = C*b(n+m) - (-1)^m * b(n). If so, then it seems that a(n) is half the value of C for each nonsquare n, or 1. See A003285 for the conjecture regarding m. The same conjectures apply to the sequences of the numerators of continued fraction convergents to sqrt(n). · The conjecture is true, cf. link.
Posed by Jan Ritsema van Eck, Ralf Stephan · OEIS nice
This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/oeis-a006702.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.
Text: OEIS Foundation, CC BY-SA 4.0. Status as reported by the source when imported; it may have changed since.
Step 1: state it in Lean. The file your agent writes: statements/oeis-a006702.lean
import Mathlib /-! # A006702: Solution to a Pellian equation: least x such that x^2 - n*y^2 = +- 1. Source: https://oeis.org/A006702 Credit: @<your GitHub handle> State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification. Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging. -/ namespace OMA.S_oeis_a006702 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_oeis_a006702