4. The ratio of the number of red beads on a chain to the number of yellow beads is the same as the ratio of the number of yellow beads to the number of blue beads. There are 30 more blue beads than red ones. How many red beads could be on the chain?
SolUTION
Let the numbers of red, yellow and blue beads be $r, y$ and $b$ respectively.
Then we have $\frac{r}{y}=\frac{y}{b}$ and $b=30+r$ and we must find positive integer solutions.
We have $y^{2}=b r=r(30+r)=(r+15)^{2}-225$.
This rearranges to $(r+15)^{2}-y^{2}=(r+15+y)(r+15-y)=225=3^{2} \times 5^{2}$, which we express as a product of positive integer factors $m$ and $n$ with $m>n$.
Then $r=\frac{m+n-30}{2}$ and $y=\frac{m-n}{2}$.
The table shows all possible values solving the equation in positive integers and the respective values for $r, y$ and $b$.
\begin{tabular}{c|c|c|c|c}
$m$ & $n$ & $r$ & $y$ & $b$ \\
225 & 1 & 98 & 112 & 128 \\
75 & 3 & 24 & 36 & 54 \\
45 & 5 & 10 & 20 & 40 \\
25 & 9 & 2 & 8 & 32 \\
15 & 15 & 0 & 0 & 0
\end{tabular}

The final line of the table is not relevant as we do not have $m>n$ which leads to the ratio of red to yellow being indeterminate. However, it is useful to check we have considered all pairs of numbers multiplying to 225 .

Hence the possible numbers of red beads are $2,10,24$ or 98 .