A069867 Primes in which repeatedly deleting the least significant digit then the most significant digit gives a prime at every step until a single-digit prime remains.
2, 3, 5, 7, 23, 29, 31, 37, 53, 59, 71, 73, 79, 131, 137, 139, 173, 179, 233, 239, 373, 379, 431, 433, 439, 479, 673, 677, 733, 739, 839, 971, 977, 1319, 1373, 1733, 2237, 2239, 2293, 2297, 2711, 2713, 2719, 3313, 3319, 3371, 3373, 3533, 3539, 3593, 3733
Offset: 1
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..440 (Primes p <= 5 * 10^7).
Programs
-
Mathematica
Select[Prime@ Range@ 512, AllTrue[FromDigits /@ Rest@ Fold[Append[#1, Delete[Last[#1], 1 - 2 Boole[OddQ@ #2]]] &, {#}, Range[Length@ # - 1]] &@ IntegerDigits[#], PrimeQ] &] (* Michael De Vlieger, Jan 20 2018 *)
Extensions
Corrected and extended by Larry Reeves (larryr(AT)acm.org), Sep 24 2002