Palindromic primes: Difference between revisions

(Added Algol 68)
Line 22:
FOR n TO 9 DO IF prime[ n ] THEN print( ( " ", whole( n, 0 ) ) ) FI OD;
# the only palindromic 2 digit numbers are multiples of 11 #
# so 11 is the only possible 2 digit palindromic prime #
IF prime[ 11 ] THEN print( ( " 11" ) ) FI;
# three digit numbers, the first and last digits must be odd #
# and cannot be 5 (as the number would be divisible by 5) #
3,043

edits