Idoneal numbers: Difference between revisions

Content deleted Content added
Drkameleon (talk | contribs)
added Arturo
KenS (talk | contribs)
Iniital post
Line 444: Line 444:
120 130 133 165 168 177 190 210 232 240 253 273 280
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>
312 330 345 357 385 408 462 520 760 840 1320 1365 1848</pre>


=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
local fn IsIdoneal( n as long ) as BOOL
long a, b, c, sum
BOOL result = NO
for a = 1 to n
for b = a + 1 to n
if ( a * b + a + b > n ) then break
for c = b + 1 to n
sum = a * b + b * c + a * c
if ( sum = n ) then result = NO : exit fn
if ( sum > n ) then break
next
next
next
result = YES
end fn = result


long r, n

r = 0
print "The 65 known Idoneal numbers:"
for n = 1 to 1850
if ( fn IsIdoneal( n ) == YES )
printf @"%5ld\b", n
r++
if r mod 13 == 0 then print
end if
next

HandleEvents
</syntaxhighlight>
{{output}}
<pre>
The 65 known Idoneal numbers:
1 2 3 4 5 6 7 8 9 10 12 13 15
16 18 21 22 24 25 28 30 33 37 40 42 45
48 57 58 60 70 72 78 85 88 93 102 105 112
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|Go}}==
=={{header|Go}}==