isPrimroot: Primitive Root Test

Description Usage Arguments Details Value Examples

View source: R/is.R

Description

Determine whether g generates the multiplicative group modulo p.

Usage

1
  isPrimroot(g, p)

Arguments

g

integer greater 2 (and smaller than p).

p

prime number.

Details

Test is done by determining the order of g modulo p.

Value

Returns TRUE or FALSE.

Examples

1
2
3
isPrimroot(2, 7)
isPrimroot(2, 71)
isPrimroot(7, 71)

numbers documentation built on May 15, 2021, 1:08 a.m.