Learn R Programming

Zseq (version 0.2.0)

Prime: Prime numbers

Description

Under OEIS A000040, a Prime number is a natural number with no positive divisors other than 1 and itself. First 6 prime numbers are 2, 3, 5, 7, 11, 13.

Usage

Prime(n, gmp = TRUE)

Value

a vector of length n containing first entries from the sequence.

Arguments

n

the number of first n entries from the sequence.

gmp

a logical; TRUE to use large number representation, FALSE otherwise.

Examples

Run this code
## generate first 30 Regular numbers
print(Prime(30))

Run the code above in your browser using DataLab