Arithmetic numbers: Difference between revisions

Line 854:
local hundr = {1}
 
for n = 2, 10000001228663 do
local f = factors (n)
local s = sum (f)
Line 872:
elseif arithmetic_count == 1000
or arithmetic_count == 10000
or arithmetic_count == 100000 then
or arithmetic_count == 1000000 then
print (arithmetic_count..'th arithmetic number is '..(n))
print ('Number of composite arithmetic numbers <= '..(n)..': '..composite_count)
orelseif arithmetic_count == 1000000 then
print (arithmetic_count..'th arithmetic number is '..(n))
print ('Number of composite arithmetic numbers <= '..(n)..': '..composite_count)
return
end
end
Line 895 ⟶ 898:
100000th arithmetic number is 125587
Number of composite arithmetic numbers <= 125587: 88219
1000000th arithmetic number is 1228663
(Done in 35.94 seconds)</pre>
Number of composite arithmetic numbers <= 1228663: 905043
 
(Done in 3556.9417 seconds)</pre>
 
=={{header|Pascal}}==
Anonymous user