Truncatable primes: Difference between revisions

Content deleted Content added
Drkameleon (talk | contribs)
Drkameleon (talk | contribs)
Line 191:
}
 
isTruncatablePrime: @(nums){-> all nums => isPrime }
 
MaxLeft: 0
Line 197:
 
loop [rangeBy 3 1000000 2] @(n){
if [isTruncatablePrime [leftTrunc n]] {-> MaxLeft: n }
if [isTruncatablePrime [rightTrunc n]] {-> MaxRight: n }
}
 
print "Max Left-Truncatable Prime found (<1000000): " + MaxLeft
print "Max Right-Truncatable Prime found (<1000000): " + MaxRight</lang>
</lang>
 
{{out}}