1. Find all natural numbers $k$ for which the decimal representation of the number $6^{k} \cdot 7^{2007-k}$ ends with the digits a) 02; b) 04.
SOLUTION. By repeatedly multiplying by the number 6, we find that the last two digits of the powers $6^{k}$ for $k=1,2,3, \ldots$ are successively

$$
06,36,16,96,76,56,36,16,96,76,56, \ldots
$$

they thus repeat from the second term with a period of length 5. Similarly, by repeatedly multiplying by the number 7, we find that the last two digits of the powers $7^{m}$ for $m=1,2,3, \ldots$ are successively

$$
07,49,43,01,07,49,43,01, \ldots
$$

they thus repeat from the first term with a period of length 4.

a) Since every power of six ends in the digit 6, the number $6^{k} \cdot 7^{2007-k}$ will end in a two only if the number $7^{2007-k}$ ends in the two-digit number 07 (other two-digit numbers from (2) do not satisfy this). By multiplying the numbers $6,36,16,96,76$ and 56, however, we find that the number $6^{k} \cdot 7^{2007-k}$ can have only one of the digits $1,3,4,5,7,9$ in the second-to-last place in such a case. Therefore, ending with the two-digit number 02 is not possible.

b) Since every power of six ends in the digit 6, the number $6^{k} \cdot 7^{2007-k}$ will end in a four precisely when $7^{2007-k}$ ends in the two-digit number 49 (other two-digit numbers from (2) do not satisfy this). By multiplying all different numbers from (1), we find that $6^{k} \cdot 7^{2007-k}$ ends in the two-digit number 04 only when $6^{k}$ ends in the two-digit number 96. The number $6^{k}$ ends in 96 precisely when the exponent $k$ is of the form $k=4+5a$; the number $7^{2007-k}$ ends in 49 precisely when the corresponding exponent is of the form $2007-k=2+4b$. Substituting $k=4+5a$ gives the equation $2007-4-5a=2+4b$, where $a$ and $b$ are non-negative integers. From this, we get

$$
b=\frac{2001-5a}{4}=500-a-\frac{a-1}{4}.
$$

For $b$ to be an integer, $a-1$ must be divisible by four, i.e., $a=4c+1$; then $b=499-5c$, $k=9+20c$. The exponent $2007-k$ equal to $1998-20c$ cannot be negative, so $c \leqq 99$.

The number $6^{k} \cdot 7^{2007-k}$ ends in the two-digit number 04 precisely when the number $k$ is of the form $k=9+20c$, where $c \in\{0,1,2, \ldots, 99\}$.

Note. Equations of the form $ax+by=c$, where $a, b, c$ are given integers and $x, y$ are integer unknowns, are called linear Diophantine equations in two unknowns. Students should familiarize themselves with solving such equations.

GUIDING AND SIMILAR PROBLEMS: