[seqfan] Re: The Annoyance Sequence

Allan Wechsler acwacw at gmail.com
Wed Jul 19 23:10:10 CEST 2023


I always try to make novel definitions simpler, and I came up with this
variant of Ali Sada's idea.

Start with 2,3,4,5,...

At each step, "annoy" the first element, then record the new first element
and throw it away. This gives:

3,4,2,5,6,... (pop 3)
2,5,6,7,4,8,9,... (pop 2)
6,7,4,8,9,5,10,11,... (pop 6)

The popped numbers in order are 3,2,6,4,9,10,12,...

I think this is not a permutation, because there is a collection of numbers
that never manage to get emitted, of which I think the smallest is 5. This
was all worked out by hand and I would appreciate confirmation.

On Tue, Jul 18, 2023 at 1:30 AM Ali Sada via SeqFan <seqfan at list.seqfan.eu>
wrote:

>  Thank you, Allan and Arthur, for answering my question, and for verifying
> the terms of the sequence. I really appreciate it. Under such temperature
> (40+ C) all the words came to my mind were negative (annoy, disturb,
> displace, etc.)
> And thank you, Mike, for the fascinating analysis. I wish you could have
> done it my version too! I would love to see the "cool" and the "late" ones!
>
> This is the definition I came up with:  Starting with a list of positive
> integers and setting a(1) = 1, we follow a process: remove each of the a(n)
> terms to the right of a(n), m, from the list, and then insert it m steps to
> the right. The number remaining to the right of a(n) becomes a(n+1).
>  I am sure it needs a lot of corrections and I would really appreciate the
> help!
> Best,
> Ali
>
>     On Sunday, July 16, 2023 at 07:10:06 PM GMT+1, Arthur O'Dwyer <
> arthur.j.odwyer at gmail.com> wrote:
>
>  Ali's description makes sense to me. (Although FWIW I don't like the
> "Annoying Sequence" name; it doesn't seem to convey anything useful about
> the structure, and it's just... annoying?)
> Here's a Python program that implements the idea (up to the 50th term):
>
>
>
> def smartlyTruncatedList(x):
>
>
>   i = len(x)
>
>   while (x[i-1] == i):
>
>     i -= 1
>
>   return x[:i]
>
>
>
>
> theList = list(range(1,10000))
>
> for i in range(0, 50):
>
>   print('Before step %d, the list is: %r' % (i+1,
> smartlyTruncatedList(theList)))
>
>   annoyingNumber = theList[i]
>
>   for d in range(0, annoyingNumber):
>
>     annoyedNumber = theList[i+1]
>
>
>
>     assert (i+2+annoyedNumber < len(theList))
>
>     theList = theList[:i+1] + theList[i+2:i+2+annoyedNumber] +
> [annoyedNumber] + theList[i+2+annoyedNumber:]
>
>
>
>     print('  After %d annoys %d, the list is: %r' % (annoyingNumber,
> annoyedNumber, smartlyTruncatedList(theList)))
>
>
>
> And here's the program's output, which agrees with Ali's:
>
>
>
> Before step 1, the list is: []
>
>   After 1 annoys 2, the list is: [1, 3, 4, 2]
>
> Before step 2, the list is: [1, 3, 4, 2]
>
>   After 3 annoys 4, the list is: [1, 3, 2, 5, 6, 7, 4]
>
>   After 3 annoys 2, the list is: [1, 3, 5, 6, 2, 7, 4]
>
>   After 3 annoys 5, the list is: [1, 3, 6, 2, 7, 4, 8, 5]
>
> Before step 3, the list is: [1, 3, 6, 2, 7, 4, 8, 5]
>
>   After 6 annoys 2, the list is: [1, 3, 6, 7, 4, 2, 8, 5]
>
>   After 6 annoys 7, the list is: [1, 3, 6, 4, 2, 8, 5, 9, 10, 11, 7]
>
>   After 6 annoys 4, the list is: [1, 3, 6, 2, 8, 5, 9, 4, 10, 11, 7]
>
>   After 6 annoys 2, the list is: [1, 3, 6, 8, 5, 2, 9, 4, 10, 11, 7]
>
>   After 6 annoys 8, the list is: [1, 3, 6, 5, 2, 9, 4, 10, 11, 7, 12, 8]
>
>   After 6 annoys 5, the list is: [1, 3, 6, 2, 9, 4, 10, 11, 5, 7, 12, 8]
>
> Before step 4, the list is: [1, 3, 6, 2, 9, 4, 10, 11, 5, 7, 12, 8]
>
>   After 2 annoys 9, the list is: [1, 3, 6, 2, 4, 10, 11, 5, 7, 12, 8, 13,
> 14, 9]
>
>   After 2 annoys 4, the list is: [1, 3, 6, 2, 10, 11, 5, 7, 4, 12, 8, 13,
> 14, 9]
>
> Before step 5, the list is: [1, 3, 6, 2, 10, 11, 5, 7, 4, 12, 8, 13, 14, 9]
>
> [...]
>
>
>
>   After 116 annoys 52, the list 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, [...]
>
>
>
>
>
>
> On Sun, Jul 16, 2023 at 1:38 PM Ali Sada via SeqFan <seqfan at list.seqfan.eu>
> wrote:
>
>  Hi Alex and Yifan Xe,
> Thank you very much for your responses.
> Alex wrote  "I wonder if it's a permutation of the integers"
> I have seen similar comments on the OEIS regarding permutations of
> positive integers. TBH, I don't know why we need a proof in these cases.
> For example, in this sequence we started we the list of positive integers
> and the algorithm doesn't add or delete any numbers, so, the sequence
> should be a permutation of positive integers.
>
> The question is whether any specific integer is unlucky enough to keep
> getting bumped out of its position over and over and over forever.For
> example, we see that the number "77" doesn't appear anywhere in the first
> 50 terms of the sequence quoted above. Suppose "77" doesn't appear in the
> first 200 terms (as indeed it doesn't). Suppose it doesn't appear in the
> first billion terms. Suppose it never appears. If that's the case — if it's
> the case that "77" never appears in the OEIS sequence — then the OEIS
> sequence certainly can't be a permutation of the integers.
> HTH,Arthur
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>


More information about the SeqFan mailing list