2
$\begingroup$

Let $P(n)$ of a sequence $s(1),s(2),s(3),...$ be obtained by leaving $s(1),...,s(n-1)$ fixed and reversing every n consecutive terms thereafter; apply $P(2)$ to $1,2,3,...$ to get $PS(2)$, then apply $P(3)$ to $PS(2)$ to get $PS(3)$, then apply $P(4)$ to $PS(3)$, etc. The limit of $PS(n)$ is $a(n)$ (A057030).

The sequence begins $$1, 3, 4, 6, 11, 13, 14, 22, 27, 29, 40, 42, 47, 55, 66$$

Let $$b(n,m)=b(n-1,m) + (m-n) - 2(b(n-1,m)\operatorname{mod}(m-n)), b(0,m)=m$$

I conjecture that $$a(n)=b(n-1,n)$$

In other words, we need $n-1$ iterations to get $a(n)$ starting from $n$, for example:

$$5-7-8-10-11$$ $$10-17-23-26-28-27-25-26-28-29$$ $$15-27-38-46-53-57-60-60-59-55-60-64-65-65-66$$

Is there a way to prove it?

$\endgroup$
5
  • 2
    $\begingroup$ Can you explain a bit your conjecture with words? The definition of $b$ is quite cumbersome. $\endgroup$ Commented Feb 12, 2022 at 9:50
  • $\begingroup$ @AlessandroDellaCorte, thank you for comment! Done. $\endgroup$ Commented Feb 12, 2022 at 11:53
  • 1
    $\begingroup$ You only define $b(n,m)$ for $n<m$? $\endgroup$ Commented Feb 12, 2022 at 14:38
  • $\begingroup$ @მამუკაჯიბლაძე, you are absolutely right. $\endgroup$ Commented Feb 12, 2022 at 15:09
  • 1
    $\begingroup$ An equivalent statement might be easier to prove: $a(n)=c_1(n)$, where$$c_k(m)=\begin{cases}k-m,&m\leqslant k\\k+c_{k+1}(m)-2\left(c_{k+1}(m)\mod k\right),&m>k\end{cases}$$ $\endgroup$ Commented Feb 12, 2022 at 15:21

1 Answer 1

8
$\begingroup$

We may assume that, at the beginning of the process, we first apply $P(1)$ which does nothing.

To learn what $a(m)$ is, revert the process as follows. Take the sequence $1,2,\dots,m,\dots$, apply $P(m)$, then apply $P(m-1)$, $\dots$, finally apply $P(1)$. After applying $P(m)$, the position of $m$ indicates where $a(m)$ stands in $PS(n-1)$; similarly, after applying $P(k)$, the position of $m$ indicates where $a(m)$ stands in $PS(k-1)$. So, after applucation of $PS(1)$, we get $m$ at position $a(m)$.

Now denote by $c(n,m)$ the position of $m$ in this reverted process after applying $P(m-n)$. So $c(0,m)$ is the position where $m$ comes after applying $P(m)$ to $1,2,\dots,m,\dots$; since $m$ stands at the start of the first moving block, it maps to position $2m-1$, being the last position in that block.

Similarly, when we apply $P(m-n)$ to a number at position $c=c(n-1,m)$, we look at the block it appears in. This block starts from $(m-n)\left[\frac{c}{m-n}\right]$, and the position of $c$ in it is $c\mod(m-n)$, where we assume that positions are numbered by $0,1,\dots,m-n-1$. The number comes to a position with number $(m-n-1)-c$ at the same block. this leads to $$ c(n,m)=(m-n)\left[\frac{c(n-1,m)}{m-n}\right]+(m-n-1)-(c(n-1,m) \mod(m-n))\\ =-1+c(n-1,m)+(m-n)-2(c(n-1,m) \mod(m-n)). $$ Now a straightforward induction ahows that $c(n,m)=b(n,m)+(n-m-1)$ for all $n=0,1,\dots,m-1$, which yields $a(m)=c(m-1,m)=b(m-1,m)$, as desired.

$\endgroup$
7
  • $\begingroup$ Thank you for answer! Could you clarify why $c(n,m)$ has exactly this form? $\endgroup$ Commented Oct 15, 2023 at 10:00
  • 1
    $\begingroup$ Well, it's a standard formula for the reflection. If you revert the segment $\{0,1,\dots,m-n-1\}$, the number $i$ swaps with $m-n-i$. $\endgroup$ Commented Oct 15, 2023 at 13:03
  • $\begingroup$ Sorry, I didn't get it anyway (so I can't accept the answer). Perhaps if you add more details and give examples, I will be able to figure it out. $\endgroup$ Commented Oct 15, 2023 at 13:19
  • 1
    $\begingroup$ You may check what happens if you apply the reverse process to your numbers (5, 10, 15) if you wish/ fe.g. Toy will get $5\to 9\to 10\to 10\to 11\to 11$. Please indicate which part is incomprehensible for you. $\endgroup$ Commented Oct 15, 2023 at 16:19
  • 1
    $\begingroup$ I've expanded that; but I did not think this is that hard. $\endgroup$ Commented Oct 16, 2023 at 9:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .