8. In how many different ways can integers $a, b, c \in [1,100]$ be chosen so that the points with coordinates $A(-1, a), B(0, b)$, and $C(1, c)$ form a right triangle?
Answer: 974

Solution: $A B^{2}=1+(b-a)^{2}, B C^{2}=1+(c-b)^{2}, A C^{2}=4+(c-a)^{2}$.

If triangle $A B C$ is a right triangle with hypotenuse $A C$, then by the Pythagorean theorem $A C^{2}=A B^{2}+B C^{2}, 1+(b-a)^{2}+1+(b-c)^{2}=4+(a-c)^{2}$, which simplifies to $(b-a)(b-c)=1$. Since both factors are integers, we have only the following cases: $b=a+1=c+1$ and $b=a-1=c-1$, for each of which there are 99 triples $(a, b, c)$, i.e., 198 ways.

If the hypotenuse is side $A B$, then similarly we get the relation $(c-a)(c-b)=-2$, which is possible only in the following cases:

$c=a+1=b-2$

$c=a-1=b+2$

$c=a+2=b-1$

$c=a-2=b+1$

for each of which there are 97 triples $(a, b, c)$, i.e., a total of $97 \cdot 4=388$ ways.

If the hypotenuse is side $B C$, then we get the relation $(a-b)(a-c)=-2$. Similarly, we find 388 ways.

In total, we get $198+388+388=974$ ways.