twinPrimes | R Documentation |
Generate a list of twin primes between n1
and n2
.
twinPrimes(n1, n2)
n1, n2 |
natural numbers with |
twinPrimes
uses Primes
and uses diff
to find all
twin primes in the given interval.
In double precision arithmetic integers are represented exactly only up to 2^53 - 1, therefore this is the maximal allowed value.
Returnes a nx2
-matrix, where n
is the number of twin primes
found, and each twin tuple fills one row.
Primes
twinPrimes(1e6+1, 1e6+1001)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.