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.

Previous Showing 21-22 of 22 results.

A123466 Write the positive integer n in binary. Subdivide the binary n into runs each consisting entirely of 0's or of 1's, where the runs alternate between those of 1's and those of 0's. The sequence gives those numbers n such that there is at least one run of 1's of the same length as at least one run of 0's.

Original entry on oeis.org

2, 5, 10, 11, 12, 13, 18, 19, 20, 21, 22, 23, 25, 26, 29, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 56, 58, 61, 66, 69, 70, 71, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 98, 100, 101, 102, 103, 104
Offset: 1

Views

Author

Leroy Quet, Jul 11 2008

Keywords

Examples

			25 written in binary is 11001. The runs are (11)(00)(1). Since at least one run of 1's (the leftmost run here) is the same length as at least one run of 0's (the only run of 0's here), 25 is included in this sequence.
		

Crossrefs

Cf. A033015.

Programs

  • PARI
    is(n)=my(ones=List(),zeros=List()); if(n%2, listput(ones, valuation(n+1,2)); n>>=ones[1]); while(n, listput(zeros, valuation(n,2)); n>>=zeros[#zeros]; listput(ones, valuation(n+1,2)); n>>=ones[#ones]); #setintersect(vecsort(Vec(ones),,8), vecsort(Vec(zeros),,8))>0 \\ Charles R Greathouse IV, Mar 29 2013

Formula

a(n) ~ n. - Charles R Greathouse IV, Mar 29 2013

Extensions

a(16) to a(27) from Ray G. Opao, Jan 08 2009
a(28)-a(64) from Lars Blomberg, Dec 09 2011

A342699 Numbers k such that A342698(k) = k.

Original entry on oeis.org

0, 1, 3, 7, 9, 12, 15, 17, 19, 24, 25, 28, 31, 33, 35, 39, 48, 49, 51, 56, 57, 60, 63, 65, 67, 71, 79, 96, 97, 99, 103, 112, 113, 115, 120, 121, 124, 127, 129, 131, 135, 143, 153, 159, 192, 193, 195, 199, 204, 207, 224, 225, 227, 231, 240, 241, 243, 248, 249
Offset: 1

Views

Author

Rémy Sigrist, Mar 18 2021

Keywords

Comments

Equivalently, these are the numbers k such that each bit in the binary representation of k is next to a bit with the same value (and we consider that the first bit is next to the last bit). Hence, all terms of A033015 belong to this sequence.

Crossrefs

Programs

  • PARI
    is(n) = my (w=#binary(n)); sum(k=0, w-1, ((bittest(n, (k-1)%w)+bittest(n, k%w)+bittest(n, (k+1)%w))>=2) * 2^k)==n
Previous Showing 21-22 of 22 results.