If $a$ and $b$ are whole numbers from $1$ to $100$, how many pairs of numbers $(a,b)$ are there which satisfy $a^{\sqrt{b}}=\sqrt{a^b}$
This was from a math contest I did earlier today and I was completely stumped how to solve this!
Other than the trivial $a=1=b$ and when $b=4$ then $a \in [1,100]$
Which means there are $101$ cases but are there any more?
$$a^{\sqrt{b}}=\sqrt{a^b}$$
Squaring both sides,
$$a^{2\sqrt{b}}=a^b$$
Case 1: $a=1$. It holds regardless of $b$. ($100$ cases)
Case 2: If $a \neq 1$, $2\sqrt{b}=b \implies b=4$ ($99$ cases)