Numbers which are the cube roots of the product of their proper divisors: Difference between revisions
Numbers which are the cube roots of the product of their proper divisors (view source)
Revision as of 15:08, 6 April 2023
, 1 year ago→{{header|Lua}}
m (→{{header|Free Pascal}}: sieve limit must be 2*3 not 2^3) |
m (→{{header|Lua}}) |
||
Line 787:
-- First 50
local count, x =
while count <
x = x + 1
if is_1_or_has_eight_divisors(x) then
Line 797:
-- 500th, 5,000th and 50,000th
while count <
x = x + 1
if is_1_or_has_eight_divisors(x) then
count = count + 1▼
if count == 500 then print("\n\n500th: " .. x) end
if count == 5000 then print("5,000th: " .. x) end
▲ count = count + 1
end
end
|