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)).
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
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.
Links
- Rick L. Shepherd, Table of n, a(n) for n = 1..10000
Programs
-
PARI
\\ See the program given in A297824.
Comments