login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A362415
The n-th run occurs a(n) times, where each run is chosen to be shortest, then lexicographically earliest.
2
1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
OFFSET
1,2
COMMENTS
When a run occurs 2 times, as run numbers r and s, it has both a(r)=2 and a(s)=2.
What are the densities of 1's and 2's?
LINKS
EXAMPLE
The first few runs begin
n: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
a(n): 1, 2, 1, 1, 2, 2, 1, 1, 1, 2
Run: 1, 2, 3, 4, 5, 6
Run r=1 is {1} and its a(r) = a(1) = 1 says this {1} occurs 1 time, so never again.
Run r=2 is {2} and its a(r) = a(2) = 2 says this {2} occurs 2 times, so again later.
Run r=3 cannot be {1} since a(1)=1 does not allow a second occurrence of {1}, but it can be {1,1} and its a(r) = a(3) = 1 says this {1,1} occurs 1 time, so never again.
Run r=4 cannot be {2} because although permitted by its previous a(2)=2, here its a(r) = a(4) = 1 would say {2} occurs 1 time (which would be false), so instead run 4 must be {2,2}.
PROG
(PARI) \\ See links.
CROSSREFS
Cf. A361249 (run length transform), A000002, A001462, A028242.
Sequence in context: A306615 A037826 A079882 * A317335 A014709 A278161
KEYWORD
nonn,changed
AUTHOR
Neal Gersh Tolunsky, Apr 19 2023
STATUS
approved