OFFSET
1,1
COMMENTS
If a(n-1) has a single digit then a(n) is simply the smallest missing prime.
Leading zeros in s are ignored.
The sequence is infinite, since there infinitely many primes that start with s (see the comments in A080165).
The data in the b-file suggests that there are infinitely many primes that do not appear. Hoever, at present that is no proof that even one prime (23, say) never appears. - N. J. A. Sloane, Sep 20 2015
Alois P. Heinz points out that a(n) = A262282(n+29) starting at the 103rd term. - N. J. A. Sloane, Sep 19 2015
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..676
EXAMPLE
a(1)=2, so s is the empty string, so a(2) is the smallest missing prime, 3. After a(6)=13, s=3, so a(7) is the smallest missing prime that starts with 3, which is 31.
PROG
(Haskell)
import Data.List (isPrefixOf, delete)
a262283 n = a262283_list !! (n-1)
a262283_list = 2 : f "" (map show $ tail a000040_list) where
f xs pss = (read ys :: Integer) :
f (dropWhile (== '0') ys') (delete ys pss)
where ys@(_:ys') = head $ filter (isPrefixOf xs) pss
-- Reinhard Zumkeller, Sep 19 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 18 2015
EXTENSIONS
More terms from Alois P. Heinz, Sep 18 2015
STATUS
approved