Learn R Programming

blocksdesign (version 3.6)

isPrimePower: Prime number test

Description

Tests if a given number v is prime power and returns the base prime and the power or -1

Usage

isPrimePower(N)

Arguments

N

is the number to be tested for primality

Value

logical TRUE or FALSE

Details

tests if a given number N gives a prime Q when raised to the power Q=N**1/i for all i such that Q>1

Examples

Run this code
# NOT RUN {
isPrimePower(10000)
 
# }

Run the code above in your browser using DataLab