How many right triangles have integer leg lengths $a$ and $b$ and a hypotenuse of length $b+1$, where $b<100$? $\mathrm{(A)}\ 6\qquad$ $\mathrm{(B)}\ 7\qquad$ $\mathrm{(C)}\ 8\qquad$ $\mathrm{(D)}\ 9\qquad$ $\mathrm{(E)}\ 10$
Solution
$a^2+b^2=(b+1)^2$, so $a^2=2b+1$, i.e. $b=\frac{a^2-1}2$. Conversely, for every odd $a>1$ this $b$ is a positive integer and $a, b, b+1$ form a right triangle.
$b<100$ means $a^2<201$, so $a\in\{3,5,7,9,11,13\}$.
So we have $(a, b, b+1)=(3,4,5), (5,12,13), (7, 24, 25),$ $ (9, 40, 41), (11, 60, 61),$ $ (13, 84, 85),$ the answer is 6, (A).