Truncatable primes: Difference between revisions

Content deleted Content added
Line 354:
else
left = Math.floor n / 10
right = n % 10
while left > 0
left = max_right_truncatable_number left, f
right = nright %= 109
while right > 0
candidate = left * 10 + right
return candidate if candidate <= n and f(candidate)
right -= 1
left -= 1
right = 9
throw Error "none found"