Giải thích các bước giải:
Ta có:
$P=111....1-222..2$
$\to P=\dfrac19\cdot (10^{2020}-1)-\dfrac29\cdot (10^{1010}-1)$
$\to P=\dfrac19\cdot ((10^{2020}-1)-2\cdot (10^{1010}-1))$
$\to P=\dfrac19\cdot (10^{2020}-1-2\cdot 10^{1010}+2)$
$\to P=\dfrac19\cdot (10^{2020}-2\cdot 10^{1010}+1)$
$\to P=\dfrac19\cdot ((10^{1010})^2-2\cdot 10^{1010}+1)$
$\to P=\dfrac19\cdot (10^{1010}-1)^2$
$\to P= (\dfrac{10^{1010}-1}{3})^2$
Mà $10^{1010}-1\quad\vdots\quad 10-1$
$\to 10^{1010}-1\quad\vdots\quad 9$
$\to 10^{1010}-1\quad\vdots\quad 3$
$\to \dfrac{10^{1010}-1}{3}\in Z$
$\to (\dfrac{10^{1010}-1}{3})^2$ là số chính phương
$\to 111....1-222..2$ là số chính phương
$\to đpcm$