Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Mathematical Functions > Number Theoretic Functions >

PrimePowerQ

PrimePowerQ[expr]
yields True if expr is a power of a prime number, and yields False otherwise.
  • PrimePowerQ[m+In] automatically works over the Gaussian integers.
Test whether a number is a power of a prime number:
Test whether a number is a power of a prime number:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Integers:
Gaussian integers:
PrimePowerQ works with numbers of any size:
PrimePowerQ threads automatically over lists:
Gaussian rationals:
Test whether a number is a power of a Gaussian prime:
The first prime powers that are not prime:
The infinite sum of reciprocals of prime powers which are not prime converges:
The number of prime powers in intervals of size 1000:
A graph showing the growth of the prime powers:
Recognize Mersenne numbers:
The number 2147483647 is a Mersenne number; 524285 is not:
Use FactorInteger to get the decomposition into primes:
The only square-free prime powers are prime numbers:
The sum of divisors of a prime power n is less than 2n:
The distribution of prime powers:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team