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!)
A118248 Least nonnegative integer whose binary representation does not occur in the concatenation of the binary representations of all earlier terms. 17
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, 76, 78, 87, 88, 90, 93, 99, 101, 104, 107, 122, 128, 131, 133, 134, 136, 138, 140, 144, 148, 150, 152, 155, 156, 159, 161, 169, 170, 172, 178, 183, 188, 190 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
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
LINKS
MATHEMATICA
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 *)
PROG
(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
(Perl) $s=""; $i=0; do{$i++; $b=sprintf("%b", $i); if(index($s, $b)<0){print("$i=$b\n"); $s.=$b}}while(1);
CROSSREFS
Cf. A118247 (concatenation of binary representations), A118250, A118252 (variants where binary representations are reversed).
Sequence in context: A030773 A182245 A182246 * A132679 A216576 A116617
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
Perl program by Phil Carmody, Mar 19 2015
Crossref and Perl program by Phil Carmody, Mar 19 2015
STATUS
approved

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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)