### Random Post

### Recent Posts

### Recent Comments

Jim Randell on Enigma 544a: Merry Christ… | |

Jim Randell on Puzzle #52: Bus change | |

J. Pijnenburg on Puzzle #52: Bus change | |

Jim Randell on Puzzle #53: Painting by n… | |

GeoffR on Puzzle #52: Bus change |

### Archives

### Categories

- article (11)
- enigma (1,367)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (48)
- site news (58)
- tantalizer (93)
- teaser (7)

### Site Stats

- 233,053 hits

We can feed this problem directly to the [[

`SubstitutedExpression()`

]] solver in theenigma.pylibrary.This run file executes in 130ms.

Run:[ @repl.it ]Solution:The number is 73331.And here’s a simple Python program that uses the [[

`Primes()`

]] class fromenigma.py. It runs in 121ms.Constructing the number from the right hand side:

Extending this puzzle to 6 digits also has one solution, both single digit numbers are also prime. No solutions with 7 digits.

Here’s a full list of the primes that are both left- and right- truncatable [ https://oeis.org/A020994 ], which is why we need to allow the 1 digits to get a 5-digit solution.

An interesting use of left-truncatable primes [ https://oeis.org/A024785 ] is to make a pencil that stays prime when sharpened: [ https://twitter.com/DrTrapezio/status/921043827791720450 ]

I couldn’t resist calculating the left-truncatable primes for myself. (Here is a link to factors.py )

Coincidentally, the left truncatable prime pencil was mentioned recently in the Radio 4 series Two thousand years of puzzling