Idoneal numbers: Difference between revisions

Added Easylang
m (Remove draft tag. Draft for over a year, multiple implementations, little controversy)
(Added Easylang)
Line 484:
120 130 133 165 168 177 190 210 232 240 253 273 280
312 330 345 357 385 408 462 520 760 840 1320 1365 1848</pre>
 
 
=={{header|EasyLang}}==
{{trans|Lua}}
<syntaxhighlight lang=easylang>
maxCount = 65
while count < maxCount
n += 1
idoneal = 1
a = 1
while a + 2 < n and idoneal = 1
b = a + 1
repeat
ab = a * b
sum = 0
if ab < n
c = (n - ab) div (a + b)
sum = ab + c * (b + a)
if c > b and sum = n
idoneal = 0
.
b += 1
.
until sum > n or idoneal = 0 or ab >= n
.
a += 1
.
if idoneal = 1
count += 1
write " " & n
.
.
</syntaxhighlight>
 
 
Line 529 ⟶ 562:
312 330 345 357 385 408 462 520 760 840 1320 1365 1848
</pre>
 
 
=={{header|Go}}==
2,083

edits