Numbers that contain only 1's and 2's. Nonempty binary strings of length n in lexicographic order

Open in the 3-D viewerA007931 on the OEIS
| Terms | 100,000 (n = 1 … 100,000) |
|---|---|
| Decomposable (a > 2d) | 99,969 |
| Level class, k > L | 11,086 · 11.09 % |
| Weight class, k ≤ L | 88,883 · 88.91 % |
| Ties, k = L | 0 |
| On the level line L = 1 | 4,136 |
| Forced level, l ≤ d² | 613 |
| Range of a(n) | 1 … 2,111,122,121,211,112 |
| Range of the jump d | 1 … 888,888,888,888,889 |
| Largest weight k, level L | 2,111,122,121,111,033, 1,055,561,060,605,555 |
16 different gaps occur, from 1 to 888,888,888,888,889; the level share is 11.09 %; L = 1 holds 37 % of the level class; there are no ties; 31 terms do not decompose.
The decomposition
Every term of a strictly increasing sequence is written a(n) = k(n)·L(n) + d(n): the jump d = a(n+1) − a(n), the weight k the least divisor of a − d greater than d, the level L = (a − d)/k. A term decomposes when a > 2d; it is in the level class when k > L and in the weight class when k ≤ L. See decompwlj.com and arXiv:0711.0865, or how it works, with worked examples and a live one.