How this calculation works
If the gcd of the prime exponents is 1, the number has no nontrivial positive-integer power representation.
The largest exponent is the gcd of the prime exponentsA worked example
64 is 2⁶ and also 4³ and 8². The largest exponent is 6.
Good to know
The tool uses positive integers above 1.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Take the gcd of the prime exponents
The default input 64 factors as 2⁶. Its largest possible integer exponent is 6, with base 2. It also equals 4³ and 8², but those representations have smaller exponents. The calculator reports the largest exponent and its corresponding integer base.
For a number containing several distinct primes, an exponent k must divide every prime exponent. For 144 = 2⁴ × 3², the gcd of 4 and 2 is 2. Dividing those exponents by 2 gives base 2² × 3 = 12, confirming 144 = 12².
Interpret an exponent of one
For 72 = 2³ × 3², the exponent gcd is 1. The output therefore gives exponent 1 and base 72. This says the input has no nontrivial positive-integer power representation with exponent above one. The calculation still returns a consistent base-exponent pair.
The Neighbouring perfect squares and cubes calculator examines only exponents two and three. This tool checks all possible integer exponents through the prime-exponent gcd. A result can be a perfect fifth power without being a square or cube, such as 32 = 2⁵. Inputs must exceed one because one would have arbitrarily large positive exponents in representations 1ᵏ.
A few questions, answered
Does an even reported exponent imply a square?
Yes. Dividing the exponent by two gives an integer power whose square reconstructs the input.
Are negative bases considered?
The implementation factors positive integers and returns a positive integer base. Its stated input domain starts at 2.