Simple proof that $t^2 - du^2 = -4$ has no integer solution when $d = n^2-4$, $d \neq 5$. One can show that if $n \geq 3$ is a positive integer, $d=n^2-4$, and $\varepsilon = 1$ if $n$ is odd and $\varepsilon = 0$ if $n$ is even, then the continued fraction expansion of $\frac{\sqrt{d}+\varepsilon}{2}$ has period of even length of the form $(1,n-2)$.  One can show that such a continued fraction has period of odd length if and only if the negative Pell equation $t^2 - du^2 = -4$ has a solution.  Thus it has no solution when $d=n^2-4$ except when $d=5$, since then the period degenerates to $(1)$.  It takes some work to prove all of the details here.
However, in Barbeau's book "Pell's equation", Exercise 3.11, he says to take an odd positive integer $n$ and set $d = n^2-4$.  Part (b) of the exercise says to show that $d$ has a prime factor congruent to 3 modulo 4 and hence show that the negative Pell equation $t^2 - du^2 = -4$ has no solution.  But the claim is false: when $n=3$ or $n=15$, for instance, $d$ has no prime factor congruent to 3 modulo 4. 
It gets me wondering, though, if he had something else in mind.  Is there a short, simple proof that $t^2 - du^2 = -4$ has no solution for $d = n^2-4$, excepting the case $d=5$, perhaps just using some tricky algebra, congruence conditions, quadratic reciprocity, etc.?
 A: Start with the unit $\eta = \frac{n + \sqrt{d}}2$. It has norm $+1$, so if there is a unit with norm $-1$ then $\eta$ is a square, say $\eta = \varepsilon^2$ for
$\varepsilon = \frac{a+b\sqrt{d}}2$. This leads to $ab=1$, and there are finitely many possibilities left.
A: We need consider only $d = n^2 - 4$ when $n = 12 w + 3.$ That is, if $n \neq 0 \pmod 3,$ then one of $(n+2)(n-2)$ is divisible by $3.$ Next, if  $n \equiv 1 \pmod 4,$ then both of $(n+2),(n-2) \equiv 3 \pmod 4.$
The cycle of Gauss reduced forms equivalent to $x^2 - d y^2$ is of length 6, as you have found. The discriminant is $4 d.$
By the theorem of Lagrange, the numbers primitively represented, with absolute value up to $\sqrt d \approx n,$ are
$$ 1, 4, 2 - n. $$ Also primitively represented is
$$ 5 - 2n $$
Sometimes numbers represented in the cycle have absolute value larger than half the square root of the discriminant. A more careful search would be needed to confirm these in-between size numbers are the only one represented of that size.
I remember mentioning this to you and asking whether Zagier has something similar. I have his book, I believe he does, although I'm not sure he comes out and states the simplest version.
