is.primepower {HadamardR}R Documentation

is.primepower

Description

Checks whether given number is a prime power or not. Note that for a prime number, it would return NULL.

Usage

is.primepower(p)

Arguments

p

integer

Details

Returns a and b where p=a^b, otherwise NULL. Uses primeFactors() function of numbers package.

Value

a and b where p=a^b and a is a prime number. Otherwise NULL

Examples

is.primepower(2048)
#2 11
is.primepower(7)
#NULL
is.primepower(100)
#NULL

[Package HadamardR version 1.0.0 Index]