cp's OEIS Frontend

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.

A118248 Least nonnegative integer whose binary representation does not occur in the concatenation of the binary representations of all earlier terms.

This page as a plain text file.
%I A118248 #44 Aug 20 2017 10:02:46
%S A118248 0,1,2,4,7,8,11,16,18,21,22,25,29,31,32,35,36,38,40,58,64,67,68,70,75,
%T A118248 76,78,87,88,90,93,99,101,104,107,122,128,131,133,134,136,138,140,144,
%U A118248 148,150,152,155,156,159,161,169,170,172,178,183,188,190
%N A118248 Least nonnegative integer whose binary representation does not occur in the concatenation of the binary representations of all earlier terms.
%C A118248 Otherwise said: Omit numbers whose binary representation already occurs in the concatenation of the binary representation of earlier terms. As such, a binary analog of A048991 / A048992 (Hannah Rollman's numbers), rather than "early bird" binary numbers A161373. - _M. F. Hasler_, Jan 03 2013
%H A118248 Rainer Rosenthal, <a href="/A118248/b118248.txt">Table of n, a(n) for n = 0..9999</a>
%H A118248 Nick Hobson, <a href="/A118248/a118248.py.txt">Python program for this sequence</a>
%t A118248 Block[{b = {{0}}, a = {0}, k, d}, Do[k = FromDigits[#, 2] &@ Last@ b + 1; While[SequenceCount[Flatten@ b, Set[d, IntegerDigits[k, 2]]] > 0, k++]; AppendTo[b, d]; AppendTo[a, k], {i, 57}]; a] (* _Michael De Vlieger_, Aug 19 2017 *)
%o A118248 (PARI) A118248(n,show=0,a=0)={my(c=[a],find(t,s,L)=L || L=#s; for(i=0,#t-L, vecextract( t,(2^L-1)<<i )==s & return(1))); for(k=1,n, show && print1(a","); while( find(c,binary(a++)),); c=concat(c,binary(a)));a}  \\ _M. F. Hasler_, Jan 03 2013
%o A118248 (Perl) $s="";$i=0;do{$i++;$b=sprintf("%b",$i);if(index($s,$b)<0){print("$i=$b\n");$s.=$b}}while(1);
%Y A118248 Cf. A118247 (concatenation of binary representations), A118250, A118252 (variants where binary representations are reversed).
%K A118248 easy,nonn
%O A118248 0,3
%A A118248 _Leroy Quet_, Apr 18 2006
%E A118248 More terms from _Graeme McRae_, Apr 19 2006
%E A118248 Explicit definition from _M. F. Hasler_, Dec 29 2012
%E A118248 Perl program by _Phil Carmody_, Mar 19 2015
%E A118248 Crossref and Perl program by _Phil Carmody_, Mar 19 2015