2.1. On a grid paper, a square made up of several cells is shaded, with its sides lying on the grid lines. It is known that to get a larger square under the same condition, 47 more cells need to be shaded. Find the side length of the original square.
Answer: 23.

Solution. If the side of the original square was $n$, and the side of the obtained square became larger by $k$, then to obtain it, one needs to color $(n+k)^{2}-n^{2}=2 n k+k^{2}$ cells, i.e., $2 n k+k^{2}=47$. Therefore, $k$ is odd, and $k^{2}<47$, so $k \leqslant 5$. If $k=5$, then $10 n+25=47$, and $n$ is not an integer. If $k=3$, then $k=3$, then $6 n+9=47$, and again we get a non-integer $n$. If, however, $k=1$, then $2 n+1=47$, from which $n=23$.