[seqfan] The Annoyance Sequence

Ali Sada pemd70 at yahoo.com
Sun Jul 16 03:34:11 CEST 2023


Hi everyone,
We start with the list of positive integers 1,2,3,4,....When it turn comes, a(n) can annoy a(n) numbers and force them to jump to the right and insert themselves. When annoyed, the number m can jump m steps. 
We start with a(1) =1. The 1 can annoy only 1 number, 2. The 2 jumps 2 steps and the list becomes 1,3,4,2,5,6,7,8,9...Now, a(2) = 3. It annoys 3 numbers and force them to jump 
First, the 4 jumps 4 steps 1,3,2,5,6,7,4,8,9Then the 2 jumps 2 steps 1,3,5,6,2,7,4,8,9Finally, the 5 jumps 5 steps 1,3,6,2,7,4,8,5,9At this stage, 3 finished its annoyance and a(3) = 6, which in turn annoys 6 numbers and so on. 
The resulted sequence is
1, 3, 6, 2, 10, 9, 5, 8, 22, 4, 13, 15, 20, 29, 7, 12, 18, 32,59, 50, 19, 31, 14, 81, 16, 90, 17, 25, 78, 83, 21, 46, 65, 23, 41, 71, 64, 36,53, 47, 58, 44, 35, 76, 62, 43, 88, 49, 123, 116, 27, 111, 40, 11, 69, 30, 79, 102,24, 60, 159, 73, 248, 72, 55, 185, 45, 101, 38, 95, 141
I would really appreciate any help defining this sequence, if it were suitable for the OEIS. Note: Maybe the VBA/Excel program below explains the sequence better 

Sub Annoyance()
For i = 1 To 1000
    Cells(1, i) = i
    Next iFor i1 = 1 To 71     k1 = Cells(1, i1)
     For i2 = i1 + 1 To i1 + k1
         k2 = Cells(1, i1 + 1)
         For i3 = i1 + 1 To i1 + k2
             Cells(1, i3) = Cells(1, i3 + 1)
         Next i3
     Cells(1, i1 + k2 + 1) = k2
     Next i2
Next i1
End Sub
Best,
Ali

 


More information about the SeqFan mailing list