Quadratic Diophantine
Table of Contents
1. Project Euler
Project Euler Problem 100 requires a solution to Quadratic Diophantine equation
\begin{equation*} 2b(b-1) = t (t-1) \end{equation*}where, \(b\) is number of blue discs, and \(t\) is total number of discs.
This equation can be transformed to negative Pell's Equation by completing the squares on both sides.
\begin{equation*} 2(2b-1)^2 = (2n-1)^2-1 \end{equation*}and thus odd integer solution to
\begin{equation*} x^2 - 2y^2 = -1 \end{equation*}are required.
2. Online Solution
http://www.alpertron.com.ar/QUAD.HTM can be used to solve these equaitons. It provides recurrence relations.