TITLE: Proof $\sqrt{2}$ irrational using last digits
QUESTION [10 upvotes]: "This proof was found by Sergey Markelov when yet in high school. In the decimal system, a square of an integer may only end in one of the following digits: $0$, $1$, $4$, $5$, $6$, $9$ whereas twice a square may only end with $0$, $2$, $8$. Thus assuming $a^2=2b^2$, both $a$ and $b$ may only end with $0$. This triggers an infinite descent which proves that this is also impossible."
What exactly is the infinite descent here? I can see that the only solution is $a=0$, $b=0$, but I don't see how that shows that there exist smaller $a$, $b$.

REPLY [3 votes]: I was struggling to see how the last digit of $b^2$ must be 0. I believe the answer is that it is not necessary, it could be 0 or 5. It can be seen that the last digits of $a^2,b^2$ must be in 0,1,4,9,6,5 , so cannot be 2 or 8,
$$
a^2\equiv 0 \mod 10$$
$$ 2b^2\equiv 0 \mod 10$$
Since $2|10$,
$$ b^2\equiv 0 \mod 5$$
Then since 5 is prime, we can make the argument that the factor of 5 did not come from squaring. Therefore if true for $b,a$ we can divide by 5 to find it is also true for two smaller integers, leading to a contradiction by infinite descent due to the well ordering principle.