Super-Poulet numbers: Difference between revisions

Content added Content deleted
m (syntax highlighting fixup automation)
Line 56: Line 56:


=={{header|Julia}}==
=={{header|Julia}}==
<syntaxhighlight lang="ruby">using Primes
<syntaxhighlight lang="julia">using Primes


divisors(n) = @view sort!(vec(map(prod, Iterators.product((p.^(0:m) for (p, m) in eachfactor(n))...))))[begin:end-1]
divisors(n) = @view sort!(vec(map(prod, Iterators.product((p.^(0:m) for (p, m) in eachfactor(n))...))))[begin:end-1]