OFFSET
1,1
COMMENTS
The sequence is finite with last term a(114) = 149, see link and b-file. - Reinhard Zumkeller, Jan 06 2014
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..114
Reinhard Zumkeller, Proof of finiteness
PROG
(Haskell)
a059496 n = a059496_list !! (n-1)
a059496_list = 2 : f [2] [2] where
f qs xs = g candidates where
g [] = []
g (ys:yss) | a010051 q == 0 || q `elem` qs = g yss
| otherwise = q : f (q:qs) ys
where q = foldr (\d r -> 10 * r + d) 0 ys
candidates = [us ++ [z] ++ vs | i <- [0 .. length xs - 1],
let (us, (_:vs)) = splitAt i xs, z <- [1..9]] ++
[xs ++ [z] | z <- [1..9]]
-- Reinhard Zumkeller, Jan 06 2014
CROSSREFS
KEYWORD
nonn,base,nice,fini,full
AUTHOR
David W. Wilson, Feb 05 2001
STATUS
approved