OFFSET
0,3
COMMENTS
"Reversed" means here "read from right to left", or "least significant bit first" (and not e.g. bitwise negation). One could also drop "reversed" everywhere and concatenate the preceding terms in decreasing order. The definition yields necessarily a strictly increasing sequence. - M. F. Hasler, Dec 29 2012
LINKS
Rainer Rosenthal, Table of n, a(n) for n = 0..9999
EXAMPLE
The concatenation of the reversed binary representation of the first 5 terms (0, 1, 3, 4, 5) is concat(0,1,11,001,101)=0111001101. The reversed binary representation of the yet unused numbers 2,6,7,8,... are 01,011,111,0001,... It is seen that only the last of these four strings is not yet a substring in the above, therefore a(5)=8.
MATHEMATICA
a = {{0}}; Do[k = 1; While[SequenceCount[Flatten@ a, Set[m, Reverse@ IntegerDigits[k, 2]]] > 0, k++]; AppendTo[a, m], {i, 57}]; Map[FromDigits[#, 2] &@ Reverse@ # &, a] (* Michael De Vlieger, Sep 19 2017 *)
PROG
(PARI) A118250(n, show=0, a=0)={my(c=[a], S=[], L); for(k=1, n, show && print1(a", "); while( setsearch(S, binary(a++)), ); c=concat(binary(a), c); S=[]; for(i=0, #c-L=#binary(a), c[i+1] & for(j=i+L, min(i+L+1, #c), S=setunion(S, Set(t=[vecextract(c, 2^j-2^i)]))))); a} \\ M. F. Hasler, Dec 29 2012
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Apr 18 2006
EXTENSIONS
More terms from Graeme McRae, Apr 19 2006
Explicit definition from M. F. Hasler, Dec 29 2012
STATUS
approved