finding the least square number finding the least square number divisibe by given numbers
This is the ink of the question I asked earlier to find the least square number divisibe by given numbers. In that question, I was told to find the lcm of given three numbers first and then to square the lcm to find the least possible square number. But working accordingy to find the least possible square number divisible by 10,12 and 18, I coud not reach the correct answer. Working according to the process I was instructed would lead me to 32400. However, 900 is also a perfect square and is divisible by all the three given numbers, which I find out by hit and trial. I would like to know the exact way to reach to the answer.
 A: You misunderstand the process used.
First, you find the least common multiple of $10, 12,$ and $18$:
\begin{align*}
10 &= 2 \cdot 5 \\
12 &= 2^2 \cdot 3 \\
18 &= 2 \cdot 3^2 \\
\operatorname{lcm}(10, 12, 18) &= 2^2 \cdot 3^2 \cdot 5 = 180
\end{align*}
Now, you prime factorize $180$ and round up each exponent to the nearest even number.
So
$$
180 = 2^2 \cdot 3^2 \cdot 5
$$
The exponent of $5$ is $1$ and rounds up to $2$, so you get the answer $2^2 3^2 5^2 = 900$.
A: Squaring the $lcm$ will not work, but the $lcm$ is a nice starting point. We know the $lcm$ is divisible by all the given numbers, so the problem is now reduced to find the least number that's a perfect square and is a multiple of the $lcm$ (note this number may be the $lcm$ itself).
Now, a number is a perfect square if all it's factors have an even exponent. So what we can do, is add one to each odd exponent of the $lcm$ factorization.
Suppose $lcm = \prod\limits_{i=1}^{m} n_i^{k_i}$ where $m$ is the number of different factors of $lcm$, the $n_i$ are the factors and the $k_i$ the exponents.
Then the number you're looking for is:
$ans =  \prod\limits_{i=0}^{m} n_i^{j_i}$
Where $j_i$ is $k_i$ if $k_i$ is even and $k_i +1$ if $k_i$ is odd.
