A perfect power is a natural number that is a product of equal natural factors, or, in other words, an integer that can be expressed as a square or a higher integer power of another integer greater than one. More formally, $n$ is a perfect power if there exist natural numbers $m > 1$, and $k > 1$ such that $m ^ k = n$. In this case, $n$ may be called a perfect $k$th power. If $k = 2$ or $k = 3$, then $n$ is called a perfect square or perfect cube, respectively.
Instances For
Equations
- Nat.IsPerfectPower.decide n = decidable_of_iff (n > 1 ∧ n.primeFactors.gcd ⇑n.factorization > 1) ⋯