I noticed a pattern in near-miss approximations for $\sqrt 2$ and eventually figured out a general iterative formula for the square roots of whole numbers:
$\frac {Nn + XDd} {Dn + Nd}$
Where
- $X$ = the value we are approximating the square root of
- $N$ = the numerator of the smallest near-miss approximation
- $D$ = the denominator of the smallest near-miss approximation
- $n$ = the numerator of the previous near-miss approximation
- $d$ = the denominator of the previous near-miss approximation
And to confirm, I mean a near-miss as where this is true $n^2 \pm 1 = Xd^2$.
For example:
$\frac 1 1$ is the smallest near-miss approximation for $\sqrt 2$, thus:
$\sqrt 2 \approx \frac{1n + 2d} {1n + 1d}$
Using that formla, the next value is $\frac{(1*1) + (2*1)} {(1*1) + (1*1)} = \frac 3 2$
Thus the next value is $\frac{(1*3) + (2*2)} {(1*3) + (1*2)} = \frac 7 5$
Which eventually makes the sequence
$$\frac 1 1 \frac 3 2 \frac 7 5 \frac {17} {12} \frac {41} {29} \frac {99} {70}...$$
Similarly $\frac 8 3$ is the smallest near-miss approximation for $\sqrt 7$
$\sqrt 7 \approx \frac{8n + 21d} {3n + 8d}$
$$\frac 8 3 \frac {127} {48} \frac {2024} {765} \frac {32257} {12192}...$$
This definitely isn't the best formula, as you must find the smallest near-miss to start with and it obviously doesn't really work with whole number square roots - $\sqrt 4$, $\sqrt 9$, $\sqrt 16$, etc., but it seems to work for all numbers I've tested.
Is there a name for this formula, or is it a specialized subset of something else?