J, 16 bytes
Big thanks to FrownyFrog for -8 bytes!
(=&#+/\=@#])_&q:
My old solution:
J, 24 bytes
[:(1=[:#@~.{.@I.}.])_&q:
Explanation:
_&q:
prime exponents
{.@I.}.]
removes the leading zeros by finding the first non-zero element:
}. drop
] from the list of exponents
{.@ as much items as the first of the
I. indices of non-zero elements
1=[:#@~.
tests if all remaining numbers are equal:
[:#@~. finds the length of the list after removing the duplicates
1= is it 1?