Determine the number of pairs of integers, $(a, b)$, with $1 \leq a \leq 100$ so that the line with equation $b=a x-4 y$ passes through point $(r, 0)$, where $r$ is a real number with $0 \leq r \leq 3$, and passes through point $(s, 4)$, where $s$ is a real number with $2 \leq s \leq 4$.
Since the line with equation $b=a x-4 y$ passes through the point $(r, 0)$, then $b=a r-0$ and so $r=\frac{b}{a}$.

Since $0 \leq r \leq 3$, then $0 \leq \frac{b}{a} \leq 3$ and so $0 \leq b \leq 3 a$. (Since $a>0$, we can multiply the inequalities by $a$ without switching the direction of the inequalities.)

Since the line with equation $b=a x-4 y$ passes through the point $(s, 4)$, then $b=a s-4(4)$
and so $a s=b+16$ or $s=\frac{b+16}{a}$.

Since $2 \leq s \leq 4$, then $2 \leq \frac{b+16}{a} \leq 4$ and so $2 a \leq b+16 \leq 4 a$ (again, $a>0$ ).

Rearranging, we get $2 a-16 \xrightarrow[\leq]{a} b \leq 4 a-16$.

We now proceed by determining, for each integer $a$ with $1 \leq a \leq 100$, the number of values of $b$ that satisfy both $0 \leq b \leq 3 a$ and $2 a-16 \leq b \leq 4 a-16$.

To do this, we need to compare the possible lower and upper bounds in these inequalities.

We note that, to satisfy both pairs of inequalities, we need both $0 \leq b$ and $2 a-16 \leq b$ as well as both $b \leq 3 a$ and $b \leq 4 a-16$.

Thus, we need to compare 0 with $2 a-16$ and $3 a$ with $4 a-16$.

We note that $0 \leq 2 a-16$ is equivalent to $16 \leq 2 a$ or $8 \leq a$.

Therefore, when $1 \leq a \leq 7$, to satisfy both $0 \leq b$ and $2 a-16 \leq b$, it is sufficient to look at $0 \leq b$, and when $8 \leq a \leq 100$, it is sufficient to look at $2 a-16 \leq b$.

We note that $3 a \leq 4 a-16$ is equivalent to $16 \leq a$.

Therefore, when $1 \leq a \leq 15$, it is sufficient to look at $b \leq 4 a-16$ and when $16 \leq a \leq 100$, it is sufficient to look at $b \leq 3 a$.

Putting this all together:

- When $1 \leq a \leq 7$, it is sufficient to count the values of $b$ that satisfy $0 \leq b \leq 4 a-16$.

When $a=1,2,3,4 a-16$ is negative, so there are no values of $b$ that work.

When $a=4$, we obtain $0 \leq b \leq 0$, and so there is 1 value of $b$.

When $a=5$, we obtain $0 \leq b \leq 4$, and so there are 5 values of $b$.

When $a=6$, we obtain $0 \leq b \leq 8$, and so there are 9 values of $b$.

When $a=7$, we obtain $0 \leq b \leq 12$, and so there are 13 values of $b$.

Since $1+5+9+13=28$, then there are 28 pairs $(a, b)$ in this case.

- When $8 \leq a \leq 15$, it is sufficient to count the values of $b$ that satisfy $2 a-16 \leq b \leq 4 a-16$. For each of these $a$, there are $(4 a-16)-(2 a-16)+1=2 a+1$ values of $b$.

Thus, as $a$ ranges from 8 to 15 , there are $17+19+21+23+25+27+29+31$ values of $b$. Since $17+19+21+23+25+27+29+31=\frac{8}{2}(17+31)=192$, there are 192 pairs $(a, b)$ in this case.

- When $16 \leq a \leq 100$, it is sufficient to count the values of $b$ that satisfy $2 a-16 \leq b \leq 3 a$. For each of these $a$, there are $3 a-(2 a-16)+1=a+17$ values of $b$.

Thus, as $a$ ranges from 16 to 100 , there are $33+34+35+\cdots+115+116+117$ values of $b$ and so this many pairs $(a, b)$.

Since $33+34+35+\cdots+115+116+117=\frac{85}{2}(33+117)=85(75)=6375$, then there are 6375 pairs $(a, b)$ in this case.

Having considered all cases, we see that there are $28+192+6375=6595$ pairs in total that satisfy the desired conditions.

ANSWER: 6595

## Team Problems