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.

Showing 1-5 of 5 results.

A118251 a(1)=1. Concatenate onto the end of the sequence (from left to right) the integer m_n converted into binary and reversed (with the most significant digit on the right), where m_n is the smallest integer > A118252(n-1) and whose reversed binary representation does not occur anywhere earlier in the sequence (when the concatenated sequence is read from left to right). A118252(n) then equals m_n when written in decimal.

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1
Offset: 1

Views

Author

Leroy Quet, Apr 18 2006

Keywords

Examples

			The sequence begins 1,0,1,1,1,0,0,1,0,0,0,1,0,1,0,1,1,1,0,1,0,0,1,1. Now A118252(8) = 12, which is represented by the 0,0,1,1 at the end of the sequence. The binary representation of 13 (1011 in binary and reversed) and 14 (0111 in binary and reversed) both occur earlier in the sequence. But the binary representation of 15 (1111 in binary and reversed) does not occur earlier in the sequence, so (1,1,1,1) is added to the end of the sequence. And A118252(9) becomes 15.
		

Crossrefs

Programs

  • Mathematica
    a = {1}; b = {1}; Do[k = b[[i - 1]] + 1; While[SequenceCount[Flatten@ a, Set[d, Reverse@ IntegerDigits[k, 2]]] != 0, k++]; a = Join[a, d]; AppendTo[b, k], {i, 2, 23}]; a (* Michael De Vlieger, Aug 21 2017 *)

Extensions

More terms from Joshua Zucker, Jul 27 2006

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

Original entry on oeis.org

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
Offset: 0

Views

Author

Leroy Quet, Apr 18 2006

Keywords

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

Crossrefs

Cf. A118247 (concatenation of binary representations), A118250, A118252 (variants where binary representations are reversed).

Programs

  • 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 *)
  • 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)<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);

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

A118250 The least nonnegative integer whose reversed binary representation does not occur in the concatenation of the reversed binary representations of all preceding terms.

Original entry on oeis.org

0, 1, 3, 4, 5, 8, 10, 13, 15, 16, 18, 23, 24, 32, 35, 36, 38, 43, 55, 64, 66, 68, 70, 75, 76, 79, 83, 85, 88, 91, 95, 97, 116, 119, 120, 127, 128, 130, 132, 136, 140, 143, 147, 149, 150, 155, 157, 158, 163, 169, 170, 175, 176, 182, 186, 192, 196, 208
Offset: 0

Author

Leroy Quet, Apr 18 2006

Keywords

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

Examples

			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.
		

Crossrefs

See A118249 for the concatenation of the reversed binary representations.
Cf. A118248 (variant without reversal), A118252 (the same with positive terms).

Programs

  • 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 *)
  • 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

Extensions

More terms from Graeme McRae, Apr 19 2006
Explicit definition from M. F. Hasler, Dec 29 2012

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

Original entry on oeis.org

1, 2, 3, 4, 8, 10, 13, 15, 16, 19, 20, 32, 35, 37, 38, 40, 49, 54, 61, 64, 67, 68, 73, 74, 79, 80, 85, 87, 93, 103, 117, 121, 127, 128, 131, 134, 136, 139, 141, 143, 148, 151, 152, 155, 156, 158, 160, 165, 166, 170, 172, 174, 182, 193, 197, 217, 218, 239, 241, 251, 256, 259, 262, 264, 267, 268
Offset: 0

Author

M. F. Hasler, Dec 29 2012

Keywords

Comments

See the variant A118250 for comments and examples.

Crossrefs

Cf. A190897 (concatenation of binary representations), A118248 (the same with nonnegative integers), A118250, A118252 (variants where binary representations are reversed).

Programs

  • PARI
    A190896(n,show=0,a=1)={my(c=[0],S=[],L); for(k=1,n, show && print1(a","); while( setsearch(S,binary(a++)),); c=concat(c,binary(a)); 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}

A190897 Concatenation of A190896 written in binary.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0
Offset: 0

Author

M. F. Hasler, Dec 29 2012

Keywords

Comments

This sequence is mainly included because the sequences A118248, A118250, A118252 (variants of A190896) had "historically" been defined through the respective analogs A118247, A118249, A118251 of this present ("binary") sequence.

Crossrefs

Cf. A118247, A118249, A118251 (variants with nonnegative integers and/or binary representations reversed).
Showing 1-5 of 5 results.