How is this a Pell-like equation? EDIT: Here is the text of the original problem:

A drawer contains red socks and black socks. When two socks are drawn at random, the probability that both are red is $\frac12$.  (a) How small can the number of socks be? (b) How small if the number of black socks is even?

--
I have never done a Pell equation before but I was reading something and they mentioned that the solution was a Diophantine analysis of Pell's Equation
$(\sqrt{2} + 1)b + 1 > r > (\sqrt{2} + 1)b $

I attempted the following transform to see how it is a Pell's equation
$1 > r - (\sqrt{2} + 1)b $
I also read the articles on them but they point out that Pell-like equation is in this form
$1 = x^2 - ny^2$, $>1$ is not a square. $\sqrt{2} + 1$ does not satisfy this condition, does it?
Edited with coffeemath's corrections
 A: An important piece of the puzzle here is that the ratio must be exactly $\frac12$. This is non-trivial to get in its own right.  To see how the Pell equation works into this, let's figure out exactly what this condition says.
If the total number of socks in the drawer is $s=r+b$, then the total number of ways of drawing two socks without replacement is $s(s-1)/2$, and the number of such ways with both socks red is $r(r-1)/2$. Clearing the fractions here, then, saying that the probability is exactly one half is saying that $s(s-1)=2r(r-1)$, with both $r$ and $s$ integers. But this is a quadratic equation, and we can solve it that way: $s^2-s=2r(r-1)$; $s=\frac12(1+\sqrt{1+8r(r-1)})$.  For this to be an integer, we must have $1+8r(r-1)$ a perfect square (and note that since this quantity is odd, its square root will be odd if it's a square, so $s$ will automatically be an integer).  In other words, there's some $t$ with $t^2=8r^2-8r+1$.  But note that $(2r-1)^2 = 4r^2-4r+1$, so by taking $u=2r-1$, we have $t^2=2u^2-1$.  This is the Pell equation that drives the original problem.
Contrariwise, working from solutions of $t^2=2u^2-1$, we can find $r$ and $s$ that satisfy the original problem; since $t$ must be odd (its square is), then $s=\frac12(1+t)$ is an integer.  Any solution of this equation must also have $u$ odd (just look mod $4$), so $r=\frac12(1+u)$ is an integer.
Now, solving this problem involves looking at convergents to the continued fraction of $\sqrt{2}$; in particular, every other convergent will satisfy the equation.  (The rest will satisfy $t^2=2u^2+1$.)  The first few cases are $(t,u)=(1,1)$ (which corresponds to an impossible drawer), $(t,u)=(7,5)$, $(t,u)=(41,29)$, and $(t,u)=(239,169)$.  So the smallest number of socks in the drawer is $s=4$, with $r=3$ red socks in it; convince yourself that the probability is exactly $\frac12$ here. (Hint: where can the one black sock be?)
To solve the other half of the problem, we need to find an answer where $r$ and $s$ have the same parity; this is equivalent to saying that $t$ and $u$ are the same $\pmod 4$.  The next solution, $(t,u)=(41,29)$, satisfies this property; so a drawer with $s=21$ total socks, $r=15$ red socks, and $b=21-15=6$ blue socks is the solution here.
