Ascending primes: Difference between revisions
m
sort is not needed with use of current Combinatorics version
m (→{{header|J}}) |
m (sort is not needed with use of current Combinatorics version) |
||
Line 131:
function ascendingprimes()
return filter(isprime, [evalpoly(10,
for x in powerset([1, 2, 3, 4, 5, 6, 7, 8, 9]) if !isempty(x)])
end
foreach(p -> print(rpad(p[2], 10), p[1] % 10 == 0 ? "\n" : ""), enumerate
</lang>{{out}}
<pre>
|