A069489 Primes > 1000 in which every substring of length 3 is also prime.
1013, 1019, 1031, 1097, 1277, 1373, 1499, 1571, 1733, 1811, 1997, 2113, 2239, 2293, 2719, 3079, 3137, 3313, 3373, 3491, 3499, 3593, 3673, 3677, 3733, 3739, 3797, 4013, 4019, 4211, 4337, 4397, 4673, 4877, 4919, 5233, 5419, 5479, 6011, 6073, 6079, 6131
Offset: 1
Examples
11317 is a term as the three substrings of length 3 i.e. 113,131 and 317 all are primes.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Programs
-
Haskell
a069489 n = a069489_list !! (n-1) a069489_list = filter g $ dropWhile (<= 1000) a000040_list where g x = x < 100 || a010051 (x `mod` 1000) == 1 && g (x `div` 10) -- Reinhard Zumkeller, Apr 07 2014
-
Mathematica
Do[ If[ Union[ PrimeQ[ Map[ FromDigits, Partition[ IntegerDigits[ Prime[n]], 3, 1]]]] == {True}, Print[ Prime[n]]], {n, PrimePi[1000] + 1, 10^3}] Select[Prime[Range[169,800]],AllTrue[FromDigits/@Partition[ IntegerDigits[ #],3,1], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 05 2019 *)
Extensions
Edited, corrected and extended by Robert G. Wilson v, Apr 12 2002
Comments