Radical of an integer: Difference between revisions

m
→‎{{header|ALGOL 68}}: Fixed note about specifying the heap size
(Added Lua)
m (→‎{{header|ALGOL 68}}: Fixed note about specifying the heap size)
(One intermediate revision by the same user not shown)
Line 30:
 
=={{header|ALGOL 68}}==
When running this with ALGOL 68G, a large heap size will need to be specified, e.g.: with <code>-heap -256M</code> on the command line.<br/>
Builds tables of radicals and unique prime factor counts to avoid factorising the numbers.
<syntaxhighlight lang="algol68">
Line 1,125:
for i = 1, maxNumber do
local count = dpfc[ upfc[ i ] ]
dpfc[ upfc[ i ] ] = ( count == nullnil and 1 or count + 1 )
end
io.write( "Distribution of radicals:\n" )
3,045

edits