Greatest prime dividing the n-th cubefree number: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: extended to 1e11, matching the Pascal output)
m (→‎{{header|Phix}}: swapped n and nth for clarity)
Line 671: Line 671:
end function
end function


function A370833(atom n)
function A370833(atom nth)
if n=1 then return {1,1,1} end if
if nth=1 then return {1,1,1} end if
atom nth = cube_free(n)
atom n = cube_free(nth)
sequence f = prime_powers(nth)
sequence f = prime_powers(n)
return {n,nth,f[$][1]}
return {nth,n,f[$][1]}
end function
end function