Learn R Programming

Zseq (version 0.1.1)

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, Rmpfr = TRUE, PrecisionBits = 496)

Arguments

n

the number of first n entries from the sequence.

Rmpfr

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

PrecisionBits

a positive integer for precision bits larger than 2.

Value

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

Examples

Run this code
# NOT RUN {
## generate first 30 Regular numbers
first30 = Prime(30)

## print without trailing 0's.
print(first30, drop0trailing = TRUE)

# }

Run the code above in your browser using DataLab