O'Halloran numbers: Difference between revisions

m
→‎{{header|AppleScript}}: Minor optimisation.
(Added AppleScript.)
m (→‎{{header|AppleScript}}: Minor optimisation.)
Line 69:
end repeat
set halfMax to max div 2
set halfMaxMinus2sixthMax to halfMax -div 23
repeat with x from 1 to halfMaxMinus2sixthMax
repeat with y from 1 to (halfMaxMinus2sixthMax div x)
repeat with halfArea from (x * y + x + y) to halfMax by (x + y)
set o's evens's item halfArea to missing value
Line 80:
end OHalloranNumbers
 
return OHalloranNumbers(1000 - 1)
 
(* Repeat logic condensed from:
repeat with x from 1 to halfMaxMinus2sixthMax
repeat with y from 1 to x
set xy to x * y
if (xy > halfMaxMinus2sixthMax) then exit repeat
repeat with z from 1 to y
set halfArea to xy + (x + y) * z
557

edits