Pell numbers: Difference between revisions
→{{header|ALGOL 68}}: Simplify a bit
(→{{header|ALGOL 68}}: Typo) |
(→{{header|ALGOL 68}}: Simplify a bit) |
||
Line 127:
print( ( newline, "First 10 Pell primes:", newline, "index Pell prime", newline ) );
INT
WHILE▼
IF is probably prime( p[ pdx ] ) THEN
print( ( whole( pdx, -5 ), " ", whole( p[ pdx ], 0 ), newline ) );
c +:= 1
FI
FOR n FROM 0 TO 19 DO nsw[ n ] := p[ 2 * n ] + p[ 2 * n + 1 ] OD;▼
print( ( newline, newline, "First 20 Newman-Shank-Williams numbers:", newline ) );
FOR n FROM 0 TO 19 DO
print( ( " ", whole( nsw, 0 ) ) ); IF n = 13 THEN print( ( newline ) ) FI
print( ( newline, newline, "First 20 near isosceles right triangles:", newline ) );
|