A378117 Lexicographically earliest sequence of nonnegative integers a(0), a(1), ..., such that a(n) is the number of pairs of adjacent terms whose sum is n.
0, 1, 1, 2, 1, 3, 2, 3, 2, 4, 2, 5, 2, 5, 3, 5, 4, 5, 4, 5, 5, 5, 6, 5, 6, 5, 6, 6, 6, 7, 6, 7, 6, 7, 7, 7, 7, 8, 7, 8, 7, 8, 8, 8, 8, 8, 9, 8, 9, 8, 9, 9, 9, 9, 9, 10, 9, 10, 9, 10, 10, 10, 10, 10, 10, 11, 10, 11, 10, 11, 11, 11, 11, 11, 11, 11, 12, 11, 12
Offset: 0
Keywords
Examples
We can take a(0) = 0. We cannot take a(1) = 0 as there are no pairs of consecutive terms summing to 0. We can take a(1) = 1. We cannot take a(2) = 0 as we already have one pair of consecutive terms summing to 1. We can take a(2) = 1. We cannot take a(3) = 0 as we already have one pair of consecutive terms summing to 1. We cannot take a(3) = 1 as we already have one pair of consecutive terms summing to 2. We can take a(3) = 2.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10032
- Rémy Sigrist, Colored scatterplot of the first 65000 terms (where the color denotes the parity of n)
- Rémy Sigrist, C++ program