Numbers whose count of divisors is prime: Difference between revisions
Content added Content deleted
Line 99: | Line 99: | ||
ispdc(n) = (ndivs = prod(collect(values(factor(n))).+ 1); ndivs > 2 && isprime(ndivs)) |
ispdc(n) = (ndivs = prod(collect(values(factor(n))).+ 1); ndivs > 2 && isprime(ndivs)) |
||
foreach(p -> print(rpad(p[2], 8), p[1] % 10 == 0 ? "\n" : ""), |
foreach(p -> print(rpad(p[2], 8), p[1] % 10 == 0 ? "\n" : ""), enumerate(filter(ispdc, 1:100000))) |
||
enumerate(filter(ispdc, 1:100000))) |
|||
</lang>{{out}} |
</lang>{{out}} |
||
<pre> |
<pre> |