Is the number 100k+11 ever a square?
Obviously all such numbers end in 11. Can a square end with an 11?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityIs the number 100k+11 ever a square?
Obviously all such numbers end in 11. Can a square end with an 11?
Let $a^2=100\cdot k+11$. Then easily $a$ must be odd.
So $(2n+1)^2=100\cdot k+11$. It follows $2(n^2+n)=50\cdot k+5$, which is impossible.
All numbers of this form are congruent $11 \pmod 4 \equiv 3 \pmod 4 $. Now search one example of the very small list of residueclasses of that form which is also a square...
No. Only odd numbers ending with 01, 09, 21, 25, 29, 41, 49, 61, 69, 81, and 89 are squares. I will leave the proof to you.
sorted(set(n*n%100 for n in range(100) if n%2==1))
, which will confirm David's list. Of course, it's not necessary to check beyond 100.
$\endgroup$
Nov 26, 2013 at 10:03
python -c "print sorted(set((str(n*n%100)[-2:].zfill(2)) for n in range(10000000) if n%2==1))"
$\endgroup$
Nov 26, 2013 at 18:04
Let's prove the somewhat more general result that $100k +\bar{ab}$ where $a$ and $b$ are odd digits cannot be a square. Our argument will be based on reductio ad absurdum:
$c^2=100k +10a+b$
$b$ is odd $\Rightarrow c \text{ is odd}$ $$\Rightarrow (2n+1)^2 = 100k+10(2l+1)+(2m+1)\\ \Rightarrow 2(n^2+n)=50k+5(2l+1)+m$$
The left hand side is even, therefor the right hand side should be even as well; this means that m should be odd.
$$\Rightarrow m=2j+1 \\ b<10\Rightarrow j=0\text{ OR }1\\ \Rightarrow n(n+1)=25k+5l+3+j$$
The left hand side can be $0,1,2$ modulo $5$; but the right hand side would be $3 \text { OR }4$ modulo $5$; which is a contradiction.
To make the last statement more clear; we elaborate as:
$$n(n+1)\mod5=\begin{cases} 0 & n\equiv0\text{ OR 4}\\ 1 & n\equiv2\\ 2 & n\equiv1\text{ OR 3} \end{cases}$$
Hint: Write $x=100y+z$; then $x^2=100(100y^2+2yz)+z^2$. Can you have $x^2=100k+11$? That is, $z^2\equiv 11\pmod{100}$.
A simple solution
$$(10x+y)^2 = 100x^2 + 20 xy + y^2$$
where $x$ is any number, and $0 \le y \le 9$
Here is a quick solution. Begin by making a list of all odd numbers 0-100.
>>> x = range(0, 50)
>>> list(x)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]
>>> x = [2*k + 1 for k in x]
>>> x
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99]
This is now done. Now square and mod by 100. We will also use set
to weed out the pesky duplicates.
>>> x = [k*k%100 for k in x]
>>> x = set(x)
>>> x = list(x)
>>> x
[1, 69, 81, 9, 41, 29, 49, 21, 89, 25, 61]
>>>
Restore order for the sake of prettiness.
>>> x.sort()
>>> x
[1, 9, 21, 25, 29, 41, 49, 61, 69, 81, 89]
>>>
Now suppose you have any odd integer. You can write is as $100A + B$, $0 < B \le 99$, with $B$ odd. Squaring and modding you get that yields $(100A + B)^2 \% 100 = B^2 \% 100.$ You now have a complete list of the all possible last two digits of odd squares.
Ends by 11 means, $n² \mod 100 = 11$ which also implies end by one $n² \mod 10 = 1$
this is true if and only if $(n \mod 100)^2 \mod 100 = 11$ and $(n \mod 10)² \mod 10 = 1$.
Ergo you juste have to check squares of 1, 11, 21, 31, 41, 51, 61, 71, 81 and 91 and see none ends with 11.