A prime power is a positive integer that can be written as one prime number raised to a positive integer exponent.
In other words, the number must have exactly one distinct prime factor.
1. Definition of a prime power
A positive integer \(n\) is a prime power if there is a prime number \(p\) and an integer \(k\ge1\) such that:
\[
\begin{aligned}
n &= p^k.
\end{aligned}
\]
Here, \(p\) is called the prime base, and \(k\) is called the exponent.
2. Why prime numbers count as prime powers
Every prime number is a prime power because:
\[
\begin{aligned}
p &= p^1.
\end{aligned}
\]
For example:
\[
\begin{aligned}
7 &= 7^1,\\
97 &= 97^1.
\end{aligned}
\]
So prime numbers are prime powers with exponent \(1\).
3. The special case \(1\)
Under the definition used in this calculator, \(1\) is not a prime power.
There is no prime number \(p\) and no integer \(k\ge1\) such that:
\[
\begin{aligned}
1 &= p^k.
\end{aligned}
\]
4. Prime factorization test
Prime factorization gives the most reliable test. Every integer greater than \(1\) can be factored into primes:
\[
\begin{aligned}
n &= p_1^{e_1}p_2^{e_2}\cdots p_r^{e_r}.
\end{aligned}
\]
The number \(n\) is a prime power exactly when there is only one distinct prime factor:
\[
\begin{aligned}
r=1.
\end{aligned}
\]
If there is exactly one prime base, then:
\[
\begin{aligned}
n &= p^k.
\end{aligned}
\]
5. Worked example: \(81\)
Factor \(81\):
\[
\begin{aligned}
81 &= 3\cdot3\cdot3\cdot3\\
&= 3^4.
\end{aligned}
\]
The factorization contains only one distinct prime, \(3\). Therefore:
\[
\begin{aligned}
\boxed{81=3^4}.
\end{aligned}
\]
So \(81\) is a prime power with base \(3\) and exponent \(4\).
6. Worked example: \(32\)
\[
\begin{aligned}
32 &= 2\cdot2\cdot2\cdot2\cdot2\\
&= 2^5.
\end{aligned}
\]
Since the only prime factor is \(2\), \(32\) is a prime power.
7. Worked example: \(72\)
Factor \(72\):
\[
\begin{aligned}
72 &= 2\cdot2\cdot2\cdot3\cdot3\\
&= 2^3\cdot3^2.
\end{aligned}
\]
This factorization contains two distinct prime factors, \(2\) and \(3\).
Therefore, \(72\) is not a prime power.
8. How the calculator factors a number
The calculator divides the number by small primes and counts how many times each prime divides it.
If a prime \(p\) divides \(n\), the exponent is the number of repeated divisions by \(p\).
For example, with \(81\):
\[
\begin{aligned}
81\div3&=27,\\
27\div3&=9,\\
9\div3&=3,\\
3\div3&=1.
\end{aligned}
\]
Since division by \(3\) works four times, the exponent is \(4\).
9. Step-by-step method
- Enter a positive integer \(n\).
- Find the prime factorization of \(n\).
- Count how many distinct prime bases appear.
- If exactly one distinct prime appears, write \(n=p^k\).
- If zero or more than one distinct prime appears, the number is not a prime power.
10. Examples
The table below uses plain text formulas to avoid raw LaTeX inside table cells.
| Number |
Prime factorization |
Classification |
| 1 |
no prime base |
Not a prime power |
| 2 |
2 = 2^1 |
Prime power |
| 8 |
8 = 2^3 |
Prime power |
| 9 |
9 = 3^2 |
Prime power |
| 81 |
81 = 3^4 |
Prime power |
| 72 |
72 = 2^3 × 3^2 |
Not a prime power |
| 100 |
100 = 2^2 × 5^2 |
Not a prime power |
11. Formula summary
The formula table uses plain text in table cells for reliable rendering across templates.
12. Common mistakes
- Forgetting that prime numbers are prime powers with exponent \(1\).
- Calling \(1\) a prime power even though there is no prime base.
- Thinking a perfect square is always a prime power. For example, \(36=2^2\cdot3^2\), so it is not a prime power.
- Looking only at the exponent and forgetting to check whether there is one single prime base.
- Stopping the factorization too early and missing a second prime factor.
Key idea: a prime power has exactly one prime base. If the factorization uses two or more different primes, it is not a prime power.