OFFSET
1,1
COMMENTS
A116700 is a similar sequence. Note that 21 is missing from the current sequence, because we deleted 12 in computing A048991 and now 21 is no longer "earlier in the sequence". On the other hand 21 is present in A116700. - N. J. A. Sloane, Aug 05 2007
Otherwise said: Numbers which occur in the concatenation of all smaller numbers not listed in this sequence. - M. F. Hasler, Dec 29 2012
Number of terms < 10^n, n = 1, 2, ...: (0, 37, 589, 7046, ...), gives number of n-digit terms as first differences: (37, 552, 6457, ...). - M. F. Hasler, Oct 25 2019
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
Nick Hobson, Python program for this sequence
MATHEMATICA
a[0] = 1; s = "1"; a[n_] := a[n] = For[k = a[n-1] + 1, True, k++, If[StringFreeQ[s, t = ToString[k]], s = s <> t, Return[k]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 25 2013 *)
PROG
(Python) # see Hobson link
(Haskell)
import Data.List (isInfixOf)
a048992 n = a048992_list !! (n-1)
a048992_list = g [1..] [] where
g (x:xs) ys | xs' `isInfixOf` ys = x : g xs ys
| otherwise = g xs (xs' ++ ys)
where xs' = reverse $ show x
-- Reinhard Zumkeller, Dec 05 2011
(PARI) D=[]; for(n=1, 999, for(i=0, #D-#d=digits(n), D[i+1..i+#d]!=d || print1(n", ") || next(2)); D=concat(D, d)) \\ M. F. Hasler, Oct 25 2019
CROSSREFS
KEYWORD
AUTHOR
EXTENSIONS
Edited by Patrick De Geest, Jun 02 2003
STATUS
approved