If $n$ is an integer, how do you know whether $n^n$ is a perfect square, without a calculator?
The actual question is: "how many integers between $1$ and $100$ inclusive, raised to their own power, are perfect squares?".
elementary-number-theoryexponentiation
If $n$ is an integer, how do you know whether $n^n$ is a perfect square, without a calculator?
The actual question is: "how many integers between $1$ and $100$ inclusive, raised to their own power, are perfect squares?".
Best Answer
It is clear that if $n$ is an even number then, $n$ to power $n$ is surely a perfect square.
Now consider the case that n is an odd number. Let us do prime power factorization of n.
$$\text{so }n = a_1^{p_1} \times a_2^{p_2} \times a_3^{p_3} \cdots \times a_k^{p_k}$$.
Where, $a_1,a_2,\cdots,a_k$ are primes and $p_1,p_2,\cdots,p_k$ are maximum power of the corresponding prime present in $n$.
Now,
$$n^n = a_1^{p_1 \times n} \times a_2^{p_2 \times n} \times a_3^{p_3 \times n} \times a_k^{p_k \times n} $$
Now, we just have to use the fact that a number is a perfect square, iff all the powers in its prime-power-factorization are even numbers.
This suggests that all of $(p_1 \times n), (p_2 \times n), (p_3 \times n),\cdots, (p_k \times n)$ must be even to make $n^n$ a perfect square.
However, $n$ is an odd number as per our initial assumption. So it is clear that all of $p_1, p_2, p_3, \cdots, p_k$ must be even. (Since odd$ \times $odd cannot be even).
But $p_1,p_2,p_3,\cdots,p_k$ are the powers of prime-power-factorization of $n$. Since these are all even, it suggests that $n$ must also be a perfect square.
So, $n^n$ is a perfect square iff $n$ is even or $n$ itself is a perfect square.
For $n$ from $1$ to $100$ inclusive, there are $50$ even numbers. And $1, 9, 25, 49, 81$ are the five odd numbers which are perfect squares.
Hence, the answer is $55$.