This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A048991 #46 Jul 01 2021 07:11:08 %S A048991 1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,24,25,26,27,28, %T A048991 29,30,32,33,35,36,37,38,39,40,43,44,46,47,48,49,50,54,55,57,58,59,60, %U A048991 65,66,68,69,70,76,77,79,80,87,88,90,99,100,102,103,104,105,106,107,108,109,110,112 %N A048991 Write down the numbers 1,2,3,... but omit any number (such as 12 or 23 or 31 ...) which appears in the concatenation of all earlier terms. %C A048991 Similar to the "punctual birds" A131881, numbers which do not occur earlier than their "natural" position in the string 123...9101112..., but more complex to compute due to the fact that here the omitted numbers must be taken into account. Contains powers of ten A011557 as a subsequence, at indices (1, 10, 63, 402, 2954, ...), giving the number of n-digit terms as (9, 53, 339, 2552, ...). - _M. F. Hasler_, Oct 25 2019 %D A048991 Invented by 10-year-old Hannah Rollman. %H A048991 T. D. Noe, <a href="/A048991/b048991.txt">Table of n, a(n) for n = 1..10000</a> %H A048991 Nick Hobson, <a href="/A048991/a048991.py.txt">Python program for this sequence</a> %e A048991 12 is omitted since we see "1,2" at the beginning of the sequence; 101 is omitted because we can see "10,1[1]"; etc. %e A048991 Since 12 is omitted, 21 does not occur "earlier" and it is in this sequence, but not in A131881, since it occurs earlier in "12,13". - _M. F. Hasler_, Oct 25 2019 %t A048991 Clear[a]; a[1] = 1; s = "1"; a[n_] := a[n] = Catch[ For[k = a[n-1] + 1, True, k++, If[ StringFreeQ[s, t = ToString[k]], s = s <> t; Throw[k] ] ] ]; Table[a[n], {n, 1, 75}] (* _Jean-François Alcover_, Jan 09 2013 *) %o A048991 (Python) # see Hobson link %o A048991 (Haskell) %o A048991 import Data.List (isInfixOf) %o A048991 a048991 n = a048991_list !! (n-1) %o A048991 a048991_list = f [1..] [] where %o A048991 f (x:xs) ys | xs' `isInfixOf` ys = f xs ys %o A048991 | otherwise = x : f xs (xs' ++ ys) %o A048991 where xs' = reverse $ show x %o A048991 -- _Reinhard Zumkeller_, Dec 05 2011 %o A048991 (PARI) D=[]; for(n=1,199, for(i=0,#D-#d=digits(n), D[i+1..i+#d]==d && next(2)); print1(n","); D=concat(D,d)) \\ _M. F. Hasler_, Oct 25 2019 %Y A048991 See A048992 for the omitted numbers. %Y A048991 Cf. A105390. %K A048991 nonn,nice,base,easy %O A048991 1,2 %A A048991 _Bernardo Recamán_ %E A048991 Edited by _Patrick De Geest_, Jun 02 2003