k^k perfect square in [100 400]

Perfect squares among powers in range is a medium quant interview question on Brain Teasers, reported to have been seen at WorldQuant.

Difficulty Medium Topic Brain Teasers Reported at WorldQuant

MyQuantPartner is not affiliated with, endorsed by, or sponsored by these companies, and all trademarks belong to their respective owners.

This brain teaser sits at the crossroads of elementary number theory and pattern recognition, a sweet spot for quant interviews and serious quant prep. It revolves around perfect squares and self-exponentiation, forcing you to connect basic definitions with less obvious structural consequences. The setup looks innocent, but it hides a tight logical filter on which values work and which do not.

It trains your understanding of prime factorization, parity, and exponent behavior under repeated multiplication. You practice turning a verbal condition into a precise arithmetic constraint and then squeezing it through clean logical reasoning. This is exactly the kind of discrete thinking that strengthens your quant prep beyond rote formula use.

This matters for quant interviews because it tests rigor, abstraction, and speed on discrete math. Interviewers see how you reason, not just whether you remember formulas.

What it tests

The core structure here is that a number is a perfect square if and only if all exponents in its prime factorization are even. When considering expressions like $k^k$, the parity of the exponents in the prime factorization of $k$ gets multiplied by $k$, so the parity of $k$ itself becomes crucial. For even $k$, every exponent in $k$'s factorization is multiplied by an even number, always resulting in even exponents. For odd $k$, the only way for all exponents to remain even is if $k$ itself is already a perfect square, so that raising it to an odd power preserves the evenness of the exponents. This principle generalizes to any situation where a base is raised to its own power: the parity of the exponent and the structure of the base together determine whether the result is a perfect square.

Practise this question with written feedback, or hear it in a spoken mock interview.

Get started free