[seqfan] The Bad Neighbors Sequence

Ali Sada pemd70 at yahoo.com
Sun Jun 16 00:11:08 CEST 2024


Hi everyone,

In a town (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. 

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. 

I would really appreciate some help with the definition and the terms.

Best,

Ali 




More information about the SeqFan mailing list