Concatenate two primes is also prime: Difference between revisions
Concatenate two primes is also prime (view source)
Revision as of 14:04, 5 September 2021
, 2 years ago→{{header|ALGOL 68}}: Use new prime list operators from Algol 68-prime
(→{{header|ALGOL 68}}: Added libheader) |
(→{{header|ALGOL 68}}: Use new prime list operators from Algol 68-prime) |
||
Line 14:
[]BOOL prime = PRIMESIEVE max prime;
# construct a list of the primes up to the maximum low prime to consider #
[]INT
# find the primes that can be concatenated to form another prime #
[ 1 : max prime ]BOOL concat prime; FOR i TO UPB concat prime DO concat prime[ i ] := FALSE OD;
|