Mock AIME I 2015 Problems/Problem 9
Since is a multiple of , let .
We can rewrite the first and second conditions as:
(a) is a perfect square, or is a perfect square.
(b) is a power of , so it follows that , , and are all powers of .
Now we use casework on . Since is a power of , is or or .
If , then no value of makes .
If or , then no value of that is a power of makes a perfect square.
If , then and for solutions.
If , then and for solutions.
If , then and for solutions.
If , then and for solutions.
This is a total of solutions.