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 b-file 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.
Alois P. Heinz points out that this sequence and A262283 eventually merge (see the latter entry for details). - N. J. A. Sloane, Sep 19 2015
A variant without the prime number condition: A262356. - Reinhard Zumkeller, Sep 19 2015
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..705
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 !! (n-1)
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
-- Reinhard Zumkeller, Sep 19 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Franklin T. Adams-Watters and N. J. A. Sloane, Sep 18 2015
EXTENSIONS
More terms from Alois P. Heinz, Sep 18 2015
STATUS
approved