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-1 of 1 results.

A297825 a(n) is the (negative) length of the final string after iteratively removing all runs from the binary string 11011100...n (formed by concatenating the first n binary numbers, see A058935(n)).

Original entry on oeis.org

1, -1, -1, -1, -4, -2, -2, -2, -2, 2, 4, 4, 2, 3, 3, 3, 3, 4, 5, 7, 2, 4, 6, 6, 7, 6, 5, 5, 5, 5, 5, 5, 5, 6, 7, 6, 4, 6, 7, 9, 7, 1, -3, -2, -1, -1, 0, 0, 1, 2, 2, 0, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 2, 1, 1, -2, 0, 1, 3, 1, 0, -2, -6, 1, -2, -5, -4, -4, -3, -4, -4, -3, -3, -3, -3, -4, -5, -5, -6
Offset: 1

Views

Author

Rick L. Shepherd, Jan 07 2018

Keywords

Comments

There are exactly three cases: The final string may have length zero, in which case a(n) = 0. If the final string begins 0101... (bits are an initial segment of A000035), a(n) is negative. Otherwise, the final string begins 1010... (bits are an initial segment of A059841) and a(n) is positive. Thus |a(n)| always gives the actual string length (number of terms in the segment).
Of interest is the frequency of sign changes and 0 terms as n becomes large. The largest values of n in the current b-file such that a(n) = 0 are 8612 and 9899.

Examples

			a(21) = 2 because the final string after iteratively removing all runs of two or more identical bits from 11011100...10101 is 10 of length two (as shown in the A297824 example). This term is positive because the first bit of 10 is 1.
		

Crossrefs

Programs

  • PARI
    \\ See the program given in A297824.
Showing 1-1 of 1 results.