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”).

A329849
For a(n) even (respectively odd), there are a(n) even terms (respectively odd terms) between the only two occurrences of a(n). This is the lexicographically earliest sequence of nonnegative integers with this property.
1
0, 0, 1, 2, 3, 1, 4, 5, 6, 2, 7, 3, 8, 9, 10, 4, 11, 12, 13, 5, 14, 6, 15, 16, 17, 7, 18, 19, 20, 8, 21, 22, 23, 9, 24, 10, 25, 26, 27, 11, 28, 29, 30, 12, 31, 13, 32, 33, 34, 14, 35, 36, 37, 15, 38, 39, 40, 16, 41, 17, 42, 43, 44, 18, 45, 46, 47, 19, 48, 20, 49, 50, 51, 21, 52, 53, 54, 22, 55
OFFSET
1,4
LINKS
EXAMPLE
Between the two 0's there are 0 terms.
Between the two 1's there is 1 odd term (which is 3 - we don't count 2 as 2 is even).
Between the two 2's there are 2 even terms (which are 4 and 6 - we don't count 3, 1 and 5 as they are odd).
Between the two 3's there are 3 odd terms (which are 1, 5 and 7 - we don't count 4, 6 and 2 as they are even).
Between the two 4's there are 4 even terms (which are 6, 2, 8 and 10 - we don't count 5, 7, 3 and 9 as they are odd).
Etc.
CROSSREFS
Cf. A014552.
Sequence in context: A055449 A055442 A055439 * A122005 A362506 A306353
KEYWORD
base,nonn
AUTHOR
STATUS
approved