Problem: The positive integers $N$ and $N^2$ both end in the same sequence of four digits $abcd$ when written in base $10$ , where digit $a$ is not zero. Find the three-digit number $abc$

Solution: WLOG, we can assume that $N$ is a 4-digit integer $\overline{abcd}$ . Note that the only $d$ that will satisfy $N$ will also satisfy $d^2\equiv d\pmod{10}$ , as the units digit of $\overline{abcd}^2$ is affected only by $d$ , regardless of $a$ $b$ , or $c$
By checking the numbers 0-9, we see that the only possible values of $d$ are $d=0, 1, 5, 6$
Now, we seek to find $c$ . Note that the only $\overline{cd}$ that will satisfy $N$ will also satisfy $\overline{cd}^2 \equiv \overline{cd}\pmod{100}$ , by the same reasoning as above - the last two digits of $\overline{abcd}^2$ are only affected by $c$ and $d$ . As we already have narrowed choices for $d$ , we start reasoning out.
First, we note that if $d=0$ , then $c=0$ , as a number ending in 0, and therefore divisible by 10, is squared, the result is divisible by 100, meaning it ends in two 0's. However, if $N$ ends in $00$ , then recursively, $a$ and $b$ must be $0$ , as a number divisible by 100 squared ends in four zeros. As $a$ cannot be 0, we throw out this possibility, as the only solution in this case is $0$
Now, let's assume that $d=1$ $\overline{cd}$ is equal to $10c + d = 10c + 1$ . Squaring this gives $100c^2 + 20c + 1$ , and when modulo 100 is taken, it must equal $10c + 1$ . As $c$ is an integer, $100c^2$ must be divisible by 100, so $100c^2+20c+1 \equiv 20c + 1\pmod{100}$ , which must be equivalent to $10c + 1$ . Note that this is really $\overline{(2c)1}$ and $\overline{c1}$ , and comparing the 10's digits. So really, we're just looking for when the units digit of $2c$ and $c$ are equal, and a quick check reveals that this is only true when $c=0$ .However, if we extend this process to find $b$ and $a$ , we'd find that they are also 0. The only solution in this case is $1$ , and since $a=0$ here, this is not our solution. Therefore, there are no valid solutions in this case.
Let's assume that $d=5$ . Note that $(10c + 5)^2 = 100c^2 + 100c + 25$ , and when modulo $100$ is taken, $25$ is the remainder. So all cases here have squares that end in 25, so $\overline{cd}=25$ is our only case here. A quick check reveals that $25^2=625$ , which works for now.
Now, let $d=6$ . Note that $(10c + 6)^2 = 100c^2 + 120c + 36$ . Taking modulo 100, this reduces to $20c+36$ , which must be equivalent to $10c+6$ . Again, this is similar to $\overline{(2c+3)6}$ and $\overline{c6}$ , so we see when the units digits of $2c+3$ and $c$ are equal. To make checking faster, note that $2c$ is necessarily even, so $2c+3$ is necessarily odd, so $c$ must be odd. Checking all the odds reveals that only $c=3$ works, so this case gives $76$ . Checking quickly $76^2 = 5776$ , which works for now.
Now, we find $b$ , given two possibilities for $\overline{cd}$
Start with $\overline{cd} = 25$ $\overline{bcd} = 100b + \overline{cd} = 100b + 25.$ Note that if we square this, we get $10000b^2 + 5000b + 625$ , which should be equivalent to $100b + 25$ modulo 1000. Note that, since $b$ is an integer, $10000b^2 + 5000 + 625$ simplifies modulo 1000 to $625$ . Therefore, the only $\overline{bcd}$ that works here is $625$ $625^2 = 390625$
Now, assume that $\overline{cd}=76$ . We have $100b + 76$ , and when squared, becomes $10000b^2 + 15200b + 5776$ , which, modulo 1000, should be equivalent to $100b+76$ . Reducing $10000b^2 + 15200b + 5776$ modulo $1000$ gives $200b + 776$ . Using the same technique as before, we must equate the hundreds digit of $\overline{(2b+7)76}$ to $\overline{b76}$ , or equate the units digit of $2b+7$ and $b$ . Since $2b+7$ is necessarily odd, any possible $b$ 's must be odd. A quick check reveals that $b=3$ is the only solution, so we get a solution of $376$ $376^2 = 141376$
Finally, we solve for $a$ . Start with $\overline{bcd}=625$ . We have $1000a + 625$ , which, squared, gives \[1000000a^2 + 1250000a + 390625,\] and reducing modulo 10000 gives simply 625. So $\overline{abcd}=625$ . However, that makes $a=0$ . Therefore, no solutions exist in this case.
We turn to our last case, $\overline{bcd}=376$ . We have \[1000a + 376^2 = 1000000a^2 + 752000a + 141376,\] and reducing modulo $10000$ gives $2000a + 1376$ , which must be equivalent to $1000a + 376$ . So we must have $\overline{(2a+1)376}$ being equivalent to $\overline{a376}$ modulo 1000. So, the units digit of $2a+1$ must be equal to $a$ . Since $2a+1$ is odd, $a$ must be odd. Lo and behold, the only possibility for $a$ is $a=3$ . Therefore, $\overline{abcd}=9376$ , so our answer is $\boxed{937}$

Answer:  937