A090534 Least n-digit prime in which every two-digit string is also a prime, or 0 if no such number exists. (n-1 two-digit string primes occur.)
2, 11, 113, 1117, 11113, 111119, 1111379, 11111117, 111111113, 1111111973, 11111111113, 111111111379, 1111111111717, 11111111111719, 111111111111713, 1111111111111319, 11111111111111119, 111111111111111131
Offset: 1
Examples
a(5) = 11113 in which 11,11,11,13 are the two-digit string primes.
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..100
Crossrefs
Cf. A242377.
Programs
-
Mathematica
fQ[p_] := Block[{id = IntegerDigits@ p}, Union@ PrimeQ[ FromDigits@# & /@ Partition[id, 2, 1]] == {True}]; f[n_] := Block[{p = NextPrime[(10^n - 1)/9 - 1]}, While[! fQ@ p, p = NextPrime@ p]; p]; f[1] = 2; Array[ f, 19] (* Robert G. Wilson v, May 12 2014 *)
Extensions
More terms from David Wasserman, Dec 21 2005
Comments