is.primepower: is.primepower

Description Usage Arguments Details Value Examples

View source: R/is_primepower.R

Description

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

Usage

1

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

1
2
3
4
5
6
is.primepower(2048)
#2 11
is.primepower(7)
#NULL
is.primepower(100)
#NULL

HadamardR documentation built on April 14, 2020, 7:01 p.m.