Ulam numbers: Difference between revisions
→{{header|ALGOL 68}}: Tweak comments
(→{{header|ALGOL 68}}: Improve the algorithm to be more like the XPL0 sample) |
(→{{header|ALGOL 68}}: Tweak comments) |
||
Line 93:
=={{header|ALGOL 68}}==
<syntaxhighlight lang="algol68">
BEGIN # find some Ulam numbers, U(n) = the smallest number > U(n-1) that is #
Line 129:
CHAR upi = ulam[ pi ];
IF upi = unused
THEN ulam[ pi ] := one # u[ p
ELIF upi = one
THEN ulam[ pi ] := multiple # u[ p
FI
OD
|