Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-28
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

The continued fraction of D has symmetric period ending in 2a0

Statement

Let D be a positive integer that is not a square, let a0:=⌊D⌋, and let D=[a0;a1,a2,…] be its regular continued fraction. Then there is an integer ℓ≥1 such that D=[a0;a1,…,aℓ−1,2a0‾], with aj=aℓ−j(1≤j<ℓ). For the state variables of The complete quotients of D satisfy the Pn,Qn recurrence, the first returned reduced state is Pℓ=a0,Qℓ=1.

Facts & Assumptions

Given: A positive nonsquare integer D, the continued-fraction digits an of D, and the state variables Pn,Qn.

[F1]

The complete quotients satisfy αn=D+PnQn,Pn+1=anQn−Pn,Qn+1=D−Pn+12Qn, with P0=0, Q0=1, each Qn>0, and each Qn∣D−Pn2 (The complete quotients of D satisfy the Pn,Qn recurrence).

Proof

technique · induction
1.1F1algebra

For every n≥0, [F1] and the floor inequality an≤αn<an+1 give Pn+1=anQn−Pn<D. Also αn>1 for n≥1, so Qn<D+Pn<2D. Since Pn<D for n≥1, the recurrence in [F1] gives Qn≤Pn+1+Pn<D+Pn+1, and therefore Qn+1=(D−Pn+1)(D+Pn+1)Qn>D−Pn+1. Hence Pn<D<Pn+Qn(n≥1). So for n≥1 the pair (Pn,Qn) lies in the finite set of integer pairs with −D<P<D and 0<Q<2D.

2.1F1step 1.1constructalgebra

Let S be the finite set of integer pairs (P,Q) satisfying Q>0,Q∣D−P2,P<D<P+Q. Step 1.1 shows that every (Pn,Qn) with n≥1 lies in S, and [F1] defines a successor map T:S→S. This map is bijective: given (P′,Q′)∈S, put Q:=D−(P′)2Q′. The interval (D−Q,D) has irrational endpoints and length Q, so it contains exactly one integer P in the residue class −P′(modQ). Then a:=P+P′Q∈Z,P′=aQ−P,Q′=D−(P′)2Q, so T(P,Q)=(P′,Q′). Since the orbit of (P1,Q1) stays in the finite set S, there is a least ℓ≥1 with Tℓ(P1,Q1)=(P1,Q1), that is, (Pℓ+1,Qℓ+1)=(P1,Q1).

3.1F1step 2.1algebra

The recurrence at n=0 gives P1=a0,Q1=D−a02. Apply the inverse construction of step 2.1 to (P1,Q1). Then Q=D−a02Q1=1, and the interval (D−1,D) contains the unique integer a0. So the unique predecessor of (P1,Q1) in S is (a0,1). Since (Pℓ,Qℓ) is the predecessor of (P1,Q1) along the cycle from step 2.1, one has Pℓ=a0,Qℓ=1. The recurrence formula Pℓ+1=aℓQℓ−Pℓ now gives aℓ=Pℓ+Pℓ+1=a0+a0=2a0.

4.1F1step 1.1step 2.1step 3.1discharge-inductionalgebra

We prove by induction on j that Pj=Pℓ−j+1(1≤j≤ℓ),Qj−1=Qℓ−j+1(1≤j≤ℓ). The case j=1 is step 3.1 together with Q0=Qℓ=1. Assume it for some j<ℓ. Then [F1] gives Qj=D−Pj2Qj−1=D−Pℓ−j+12Qℓ−j+1=Qℓ−j. Also Pj+1 and Pℓ−j are both integers congruent to −Pj modulo Qj, and both lie in the interval (D−Qj,D) by step 1.1; by the uniqueness from step 2.1 they are equal. Thus Pj+1=Pℓ−j,Qj=Qℓ−j, completing the induction. Therefore, for 1≤j<ℓ, aj=Pj+Pj+1Qj=Pℓ−j+1+Pℓ−jQℓ−j=aℓ−j.

5.1step 2.1step 3.1step 4.1∎

Steps 2.1, 3.1, and 4.1 show that the continued-fraction digits from a1 onward repeat with period ℓ, that the last digit in one period is 2a0, and that the interior digits are palindromic. Hence D=[a0;a1,…,aℓ−1,2a0‾],aj=aℓ−j (1≤j<ℓ), with first returned reduced state (Pℓ,Qℓ)=(a0,1).

Depends on

Used by

Dependency tree · two levels

2 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources