## PROBLEM 27. MATHEMATICAL JOKE

A person bought several one-cent stamps at the post office, as many two-cent stamps so that $3 / 4$ of their quantity equals the number of one-cent stamps, as many five-cent stamps so that $3 / 4$ of their quantity equals the number of two-cent stamps, and five eight-cent stamps. He paid for them with one banknote without change. How many stamps of each denomination did he buy?
Solution. Suppose a person bought $y$ one-cent stamps. Then he bought $3 y / 4$ two-cent stamps and $9 y / 16$ five-cent stamps. Since $9 y / 16$ is an integer, $y$ is divisible by 16. Then for some integer $16 x=y$ and the purchase consisted of 16 one-cent, $12 x$ two-cent, $9 x$ five-cent, and 5 eight-cent stamps. Suppose he paid for the stamps with a $k$-dollar bill. Thus, the cost is

$$
16 x+2 \cdot(12 x)+5 \cdot(9 x)+8 \cdot 5=100 k
$$

i.e.

$$
\begin{aligned}
85 x+40 & =100 k \\
17 x=20 k-8 \quad \text { and } \quad x & =\frac{20 k-8}{17}=k+\frac{3 k-8}{17}
\end{aligned}
$$

Since the numbers $x$ and $k$ are integers, then

$$
\frac{3 k-8}{17} \text { is also an integer. }
$$

But $k$ must be one of the numbers $1,2,5,10,20,50,100$, 

1000 or 10000. The only value of $k$ among them for which $(3 k-8) / 17$ is an integer is $k=1000$, which means the person bought 18816 one-cent, 14112 two-cent, 10584 five-cent, and 5 eight-cent stamps.