login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A084383 a(0)=0; for n>0, a(n) = smallest number that is not a concatenation of any number of distinct earlier terms in increasing order. 4

%I #9 Feb 01 2024 15:44:16

%S 0,1,2,3,4,5,6,7,8,9,10,11,20,21,22,30,31,32,33,40,41,42,43,44,50,51,

%T 52,53,54,55,60,61,62,63,64,65,66,70,71,72,73,74,75,76,77,80,81,82,83,

%U 84,85,86,87,88,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105

%N a(0)=0; for n>0, a(n) = smallest number that is not a concatenation of any number of distinct earlier terms in increasing order.

%C After 11 we can see 1,2 -> 12, 1,3 -> 13, etc., but not 20.

%H Michael S. Branicky, <a href="/A084383/b084383.txt">Table of n, a(n) for n = 0..10000</a>

%o (Python)

%o from itertools import islice

%o def incats(s, L):

%o if s == "": return True

%o return any(s.startswith(w) and incats(s[len(w):], L[i+1:]) for i, w in enumerate(L))

%o def agen(): # generator of terms

%o L, an, s = ["0"], 1, "1"

%o yield from [0]

%o while True:

%o yield an

%o L.append(s)

%o while incats((s:=str(an)), L):

%o an += 1

%o print(list(islice(agen(), 70))) # _Michael S. Branicky_, Feb 01 2024

%Y Hannah Rollman's numbers: A048991, A048992.

%K nonn,base

%O 0,3

%A _Amarnath Murthy_, May 29 2003

%E More terms from _Patrick De Geest_, Jun 03 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 10 11:04 EDT 2024. Contains 375787 sequences. (Running on oeis4.)