a) Consider the last digits of numbers satisfying the conditions of the problem. We follow the last digit of their squares, so we put the matching the last digit to each square:
12→1,22→4,32→9,42→6,52→5,62→6,72→9,82→4,92→1
b) Analogously to a), we find those single-digit numbers that satisfy the conditions and write down the last digit for each third power:
13→1,23→8,33→7,43→4,53→5,63→6,73→3,83→2,93→9
- pairs (3;7) and (2;8) satisfy the conditions.
For example, we already found a pair of l-digit numbers (m,n), satisfying the condition: m's last digit is 2 its third power ends with n, and analogously, number n's last digit is 8 and its third power ends with m. Let us try to find l+1-st digits of these numbers. In all equalities, all digits to the left of l+1-st one are discarded. We denote the unknown numbers by xm and yn.
Then let m3=10′A+n, n3=10′B+m, which yields:
xm3yn3=(10′x+m)3→3⋅10′x⋅m2+m3=3⋅10′x⋅4+10′A+n→→10′(2x+A)+n=yn=10′y+n,=(10′y+n)3→3⋅10′y⋅n2+n3=3⋅10′y⋅4+10′B+m→→10′(2y+B)+m=xm=10′x+m.
After simplifications and reductions, get the system:
{2x+A=y,2y+B=x.
From which, x=2y+B=2(2x+A)+B=4x+(2A+B), hence, {3x=−(2A+B),3y=−(2B+A).
Since for arbitrary A,B there exist corresponding digits x,y (recall that the equality only applies to the last digits here), and 3x and 3y take all possible values.
Thus, corresponding pairs of numbers exist for any value of l.
Let us show by examples: the transition from a single-digit number to a two-digit number:
m1=2,m13=83x→−(2A+B)=−1→10⋅0+8⇒A=0,n1=8,n13=512→10⋅1+2⇒B=1.→9⇒x=3,3x→−(2B+A)=−2→8⇒y=6.
We obtain the numbers:
m2=xm1=32,m23=323=32768,n2=yn1=68,n23=683=314432,
which satisfy the statement.
The transition from a two-digit number to a three-digit number:
m2=32,m23=32768→100⋅7+68⇒A=7.n2=68,n23=314432→100⋅4+32⇒B=4.
m3=xm2=432,m33=4323=80621568,n3=yn2=568,n33=5683=183250432,
which, too, satisfy the statement.