7. What is the smallest positive integer $n$ such that $n^{2}$ and $(n+1)^{2}$ both contain the digit 7 but $(n+2)^{2}$ does not?
Answer: 27
Solution: The last digit of a square is never 7 . No two-digit squares begin with 7 . There are no 3 -digit squares beginning with the digits $17,27,37$, or 47 . In fact, the smallest square containing the digit 7 is $576=24^{2}$. Checking the next few numbers, we see that $25^{2}=625,26^{2}=676,27^{2}=729,28^{2}=784$, and $29^{2}=841$, so the answer is 27 .