Numbers which are the cube roots of the product of their proper divisors: Difference between revisions

m
(→‎{{header|ALGOL 68}}: Tweak comments and add attribution to blurb)
Line 206:
Fifty thousandth: 223,735
</pre>
 
=== OEIS algorithm (see talk pages) ===
<syntaxhighlight lang=python>from sympy import divisors
 
numfound = 0
for num in range(1, 1_000_000):
if num == 1 or len(divisors(num)) == 8:
numfound += 1
if numfound <= 50:
print(f'{num:5}', end='\n' if numfound % 10 == 0 else '')
if numfound == 500:
print(f'\nFive hundreth: {num:,}')
if numfound == 5000:
print(f'\nFive thousandth: {num:,}')
if numfound == 50000:
print(f'\nFifty thousandth: {num:,}')
break
</syntaxhighlight>
Output same as first algorithm.
 
=={{header|Raku}}==
4,107

edits