

A262282


a(1)=11. For n>1, let s denote the digitstring of a(n1) with the first digit omitted. Then a(n) is the smallest prime not yet present which starts with s.


4



11, 13, 3, 2, 5, 7, 17, 71, 19, 97, 73, 31, 101, 103, 37, 79, 907, 701, 107, 709, 911, 113, 131, 311, 1103, 1031, 313, 137, 373, 733, 331, 317, 173, 739, 397, 971, 719, 191, 919, 193, 937, 379, 797, 977, 773, 7307, 307, 727, 271, 7103, 1033, 337, 3701, 7013
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

If a(n1) has a single digit then a(n) is simply the smallest missing prime.
Leading zeros in s are ignored.
The bfile suggests that there are infinitely many primes that do not appear in the sequence. However, there is no proof at present that any particular prime (23, say) never appears.


LINKS



EXAMPLE

a(1)=11, so s=1, a(2) is smallest missing prime that starts with 1, so a(2)=13. Then s=3, so a(3)=3. Then s is the empty string, so a(4)=2, and so on.


PROG

(Haskell)
import Data.List (isPrefixOf, delete)
a262282 n = a262282_list !! (n1)
a262282_list = 11 : f "1" (map show (delete 11 a000040_list)) where
f xs pss = (read ys :: Integer) :
f (dropWhile (== '0') ys') (delete ys pss)
where ys@(_:ys') = head $ filter (isPrefixOf xs) pss


CROSSREFS



KEYWORD

nonn,base


AUTHOR



EXTENSIONS



STATUS

approved



