(factorize n)
Returns an unmodifiable list of prime factors in n. Will return 1 for n = 1.
Returns an unmodifiable list of prime factors in n. Will return 1 for n = 1.
(first-above n)
Returns the lowest prime above n.
Returns the lowest prime above n.
(last-below n)
Returns the highest prime below n.
Returns the highest prime below n.
(prime? n)
Checks whether an integer (long or lower) is a prime. Returns true if yes, false otherwise.
Checks whether an integer (long or lower) is a prime. Returns true if yes, false otherwise.
(primes)
Returns a lazy sequence of all primes in sorted order.
Returns a lazy sequence of all primes in sorted order.
(take n)
Returns the n first primes as an unmodifiable list.
Returns the n first primes as an unmodifiable list.
(take-below n)
Returns all primes below n as an unmodifiable list.
Returns all primes below n as an unmodifiable list.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close