OFFSET
1,2
COMMENTS
Terms and correct definition by Ruud H.G. van Tol via SeqFan.
This sequence was called The Bad Neighbors sequence on the SeqFan list.
In the beginning, we insert L(1) between L(n+1) and L(n+2), but after a few steps, that doesn’t work anymore because L(1) finds closer places between new neighbors.
EXAMPLE
In a list of positive integers, no one wants to stay near their old neighbors. 1 doesn’t want to stay near 2 anymore, so, it inserts itself between 3 and 4: 2, 3, 1, 4, 5, 6, 7, 8, ...
a(1) = 1
2 doesn’t want to stay near 3 nor 1, so it inserts itself between 4 and 5: 3, 1, 4, 2, 5, 6, 7, 8, ... .
a(2) = 2
3 doesn’t want to stay near 2 nor 4 nor 1, so, it inserts itself between 5 and 6: 1, 4, 2, 5, 3, 6, 7, 8, ... .
a(3) = 3
Now, 1 doesn’t want to stay near 2 nor 3 nor 4, so, it inserts itself between 7 and 8: 4, 2, 5, 3, 6, 7,1, 8, ... .
a(4) = 1
And so on.
CROSSREFS
KEYWORD
nonn
AUTHOR
Ali Sada, Aug 19 2024
STATUS
approved