Aliquot sequence classifications: Difference between revisions
Content added Content deleted
m (→{{header|AppleScript}}: Minor improvements to handlers.) |
m (→{{header|Phix}}: minor tidy) |
||
Line 2,608: | Line 2,608: | ||
end while |
end while |
||
return {"non-terminating",s} |
return {"non-terminating",s} |
||
end function |
|||
function flat_d(sequence s) |
|||
for i=1 to length(s) do s[i] = sprintf("%d",s[i]) end for |
|||
return join(s,",") |
|||
end function |
end function |
||
Line 2,618: | Line 2,613: | ||
for i=1 to length(n) do |
for i=1 to length(n) do |
||
{string classification, sequence dseq} = aliquot(n[i]) |
{string classification, sequence dseq} = aliquot(n[i]) |
||
dseq = join(apply(true,sprintf,{{"%d"},dseq}),",") |
|||
printf(1,"%14d => %15s, {%s}\n",{n[i],classification, |
printf(1,"%14d => %15s, {%s}\n",{n[i],classification,dseq}) |
||
end for</lang> |
end for</lang> |
||
{{out}} |
{{out}} |