Sha256: d377bd1f4552328fbe8f9be7d36bf2cfcc7c0da6173dcc24d60e63e5c489d901
Contents?: true
Size: 250 Bytes
Versions: 280
Compression:
Stored size: 250 Bytes
Contents
import java.math.BigInteger object Prime { fun nth(n: Int): Int = primes().drop(n - 1).first().toInt() fun primes(): Sequence<BigInteger> = generateSequence(BigInteger.valueOf(2)) { previous -> previous.nextProbablePrime() } }
Version data entries
280 entries across 280 versions & 1 rubygems