Ramanujan primes: Difference between revisions
m
use primes instead of primesmask
m (use primes instead of primesmask) |
|||
Line 98:
=={{header|Julia}}==
<lang julia>using Primes
const PRIMES = [primes(625000)]
@memoize function PI(n)▼
empty!(MASK)▼
if n >
push!(PRIMES, primes(2n))
end
return
findlast(x -> x <= n, first(PRIMES))
end
function Ramanujan_prime(n)
|