# Perfect squares using 20 1's, 20 2's and 20 3's.

How many perfect squares can be formed using 20 1's, 20 2's and 20 3's. This is a recent exam question, which I had no clue how to solve?

There is some kind of trick here, since time allotted to solve it was just 4 minutes.

-
All $60$ digits? None. – Ivan Loh May 14 '13 at 2:19
That's what I thought too, Ivan, but apparently from looking at the answers the question means "formed by addition using ...". – Doug McClean May 14 '13 at 13:35

Hint: The resulting number is divisible by $3$ but not by $9$, since the digit sum is $120$.

-
Thanks! Looks too simple now. But still I couldn't have figured it out in the exam. – Uma kant May 14 '13 at 5:00
Well, maybe you could now. It looks as if the criterion for divisibility by $3$, by $9$ is part of the curriculum. Ideas tend to repeat themselves on exams. – André Nicolas May 14 '13 at 5:07

How about this: $$\begin {array} &1&2&3&1&2&3&1&2&3&1&2&3&1&2&3&1\\ 2&&&&&&&&&&&&&&&2\\ 3&&&&&&&&&&&&&&&3\\ 1&&&&&&&&&&&&&&&1\\ 2&&&&&&&&&&&&&&&2\\ 3&&&&&&&&&&&&&&&3\\ 1&&&&&&&&&&&&&&&1\\ 2&&&&&&&&&&&&&&&2\\ 3&&&&&&&&&&&&&&&3\\ 1&&&&&&&&&&&&&&&1\\ 2&&&&&&&&&&&&&&&2\\ 3&&&&&&&&&&&&&&&3\\ 1&&&&&&&&&&&&&&&1\\ 2&&&&&&&&&&&&&&&2\\ 3&&&&&&&&&&&&&&&3\\ 1&2&3&1&2&3&1&2&3&1&2&3&1&2&3&1\\ \end {array}$$
If done in a properly spaced font, it looks like a perfect square to me. The sum along each side is the same

-
\begin{array}{ll}
20 *1 &= 20 \\
20 *2 &= 40 \\
20 *3 &= 60 \\
---------------
\text{total} &= 120
\end{array}


Now, Perfect square(s)... $1+4+9+16+25+36+49 = 140$ ( I can remove $2$ number with total of $20$ ($4+16$))

that will lead to

$1+9+25+36+49$ (i.e. $5$ numbers)

Answer: $5$ perfect squares can be formed..

-