login
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.
2
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,4
LINKS
Rémy Sigrist, Colored scatterplot of the first 65000 terms (where the color denotes the parity of n)
Rémy Sigrist, C++ program
EXAMPLE
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.
PROG
(C++) // See Links section.
CROSSREFS
Sequence in context: A237127 A262746 A007828 * A070804 A303429 A303656
KEYWORD
nonn,new
AUTHOR
STATUS
approved