# Is the number $333{,}333{,}333{,}333{,}333{,}333{,}333{,}333{,}334$ a perfect square?

I know that if the number is a perfect square then it will be congruent to $0$ or $1$ (mod $4$). Now since the number is even, I know that it is either $0$ or $2$ (mod $4$). How would I go about answering this?

• Is there a way to go about this without using the divisibility by 4 rule? – Al Jebr Nov 1 '13 at 21:28
• Sure, you can see that it's $\equiv 5 \pmod{7}$, so it's not a square. But looking at it modulo $4$ is the easiest and fastest way to see it, one would need a very good reason to not use it. – Daniel Fischer Nov 1 '13 at 21:34
• You can compute $\lfloor \sqrt{x}\rfloor = 18257418583505$, and see it's not a square. – Daniel Fischer Nov 1 '13 at 21:36
• In addition, we can show that $\underbrace{333\dots33}_{n\text{ }3\textrm{'s}}4$ will never be a square, for any $n$ (except $n=0$). – Akiva Weinberger Oct 24 '14 at 3:06

A number is divisible by $4$ if and only if the number made of its last two digits is divisible by $4$; this is immediate from the fact that $100$ is divisible by $4$.

The last two digits are $34 = 2 \cdot 17$, so our number is divisible by $2$ only.

• thanks. Is there a way to go about this without using that fact? – Al Jebr Nov 1 '13 at 21:16
• Divide by two: you get: 166,666,666,666,666,666,666,666,667, which is odd, then 333,333,333,333,333,333,333,333,334 is not divisible by 4. But why dividing the whole number if you can just check the last to digits and get the same result? – Carlos Eugenio Thompson Pinzón Nov 2 '13 at 5:04
• So many upvotes! – Sawarnik Jan 6 '14 at 8:22

The square of an even number is $0\pmod{4}$. The square of an odd number is $1\pmod{4}$. Thus, a perfect square is either $0$ or $1\pmod{4}$.

This number is $2$ mod $4$ since it is $n\times 100+34$ and $34\equiv2\pmod{4}$.

More generally. "Find all positive integers $k,n$ such that $\frac{(6n-2)^k-1}{3}+1$ is a square."

Answer. Clearly such a square, if it exists, has to be odd. Suppose then that there exists a positive integer $x$ such that $$\frac{1}{3}((6n-2)^k-1)+1=(2x+1)^2 \implies 12x(x+1)=(6n-2)^k-1.$$ As far as one between $x$ and $x+1$ has to be even, then $\upsilon_2((6n-2)^k-1) \ge 3$, which is clearly impossible since it's a odd number. $\blacksquare$

\$ clisp -q
[1]> (isqrt (read-from-string (remove #\, "333,333,333,333,333,333,333,333,334")))
18257418583505


The last digit of the integer square root approximation is 5. So the square of that approximation must end in 5 and thus it is not exact, meaning that the original number isn't a square.