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.

Negative Pell is soluble exactly for odd period length

Statement

Let ℓ be the period length of the regular continued fraction of D. Then the negative Pell equation x2−Dy2=−1 has an integral solution if and only if ℓ is odd.

When ℓ is odd, the convergent pℓ−1/qℓ−1 gives the least positive solution of x2−Dy2=−1, and the least positive solution of x2−Dy2=1 is the convergent p2ℓ−1/q2ℓ−1. When ℓ is even, the least positive norm-one solution is pℓ−1/qℓ−1.

Facts & Assumptions

Given: A positive nonsquare integer D, the period length ℓ of D, and the convergents pn/qn of D.

[F1]

The continued fraction of D has period [a0;a1,…,aℓ−1,2a0‾], and the first returned reduced state satisfies Pℓ=a0,Qℓ=1. (The continued fraction of D has symmetric period ending in 2a0)

[F2]

For each complete quotient, one has an=⌊αn⌋, and if αn≠an then αn+1=1αn−an. (Complete quotients in the continued-fraction algorithm)

[F3]

The complete quotients satisfy αn=D+PnQn,Qn>0. (The complete quotients of D satisfy the Pn,Qn recurrence)

[F4]

The convergents satisfy pn2−Dqn2=(−1)n+1Qn+1. (Convergents to D satisfy the norm identity).

[F5]

If a reduced rational number r/s satisfies ∣D−rs∣<12s2, then r/s is a convergent of D (Legendre's criterion for convergents).

Proof

technique · direct
1.1F1F4algebra

Applying [F4] at n=ℓ−1 and using Qℓ=1 from [F1] gives pℓ−12−Dqℓ−12=(−1)ℓ. Hence ℓ odd yields a negative-Pell solution at pℓ−1/qℓ−1, while ℓ even yields a positive norm-one solution there.

1.2F5givenalgebra

Conversely, suppose x,y>0 satisfy x2−Dy2=−1. Then 0<D−xy=1y(x+yD). Because D≥2, one has x2=Dy2−1≥y2, so x≥y, and therefore x+yD>2y. Hence ∣D−xy∣<12y2. Since gcd⁡(x,y)=1 follows from x2−Dy2=−1, fact [F5] shows that x/y=pn/qn for some convergent.

1.3F1F2F3F4algebra

By [F1] and [F3], the returned state at one full period is αℓ=D+PℓQℓ=D+a0. Since ⌊αℓ⌋=2a0, fact [F2] gives αℓ+1=1αℓ−⌊αℓ⌋=1D−a0=α1. Thus one full period returns the complete-quotient algorithm to α1; because the digits from a1 onward repeat with period ℓ, the same computation one period later gives α2ℓ=D+a0, hence Q2ℓ=1. Applying [F4] at n=2ℓ−1 yields p2ℓ−12−Dq2ℓ−12=(−1)2ℓQ2ℓ=1. Thus p2ℓ−1/q2ℓ−1 is a positive norm-one solution.

2.1F2F3F4step 1.2algebra

For that index n, [F4] gives −1=x2−Dy2=pn2−Dqn2=(−1)n+1Qn+1. Since Qn+1 is a positive integer, it follows that Qn+1=1andn is even. Facts [F2] and [F3] then give αn+1=D+Pn+1,αn+2=1αn+1−⌊αn+1⌋=1D−a0=α1. So the digit block from a1 onward repeats with period n+1. Because ℓ is the period length, ℓ divides n+1. Since n+1 is odd, ℓ must be odd.

3.1F2F3F4F5step 1.3step 2.1algebra∎

Step 2.1 shows that every positive negative-Pell solution comes from a convergent index n with n even and ℓ∣(n+1), so the first such index is ℓ−1. Now let u,v>0 satisfy u2−Dv2=1. Then 0<uv−D=1v(u+vD). Because D≥2, one has u2=Dv2+1>v2, so u>v, and therefore u+vD>2v. Hence ∣D−uv∣<12v2. Since gcd⁡(u,v)=1, [F5] shows that u/v=pn/qn for some convergent. Applying [F4] gives 1=u2−Dv2=pn2−Dqn2=(−1)n+1Qn+1, so Qn+1=1andn is odd. As in step 2.1, facts [F2] and [F3] then give αn+2=α1, so ℓ divides n+1. Therefore the first possible norm-one index is ℓ−1 when ℓ is even and 2ℓ−1 when ℓ is odd. Convergent denominators strictly increase, and for positive solutions of x2−Dy2=±1 the value of x is determined by x2=Dy2±1, so the first convergent of each type gives the least positive solution. Therefore, when ℓ is odd, pℓ−1/qℓ−1 is the least positive negative-Pell solution and p2ℓ−1/q2ℓ−1 is the least positive norm-one solution, while when ℓ is even, pℓ−1/qℓ−1 is the least positive norm-one solution.

Depends on

Used by

Dependency tree · two levels

17 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