For a positive integer $n$, an $n$-sequence is a sequence $(a_0,\ldots,a_n)$ of non-negative integers satisfying the following condition: if $i$ and $j$ are non-negative integers with $i+j \leqslant n$, then $a_i+a_j \leqslant n$ and $a_{a_i+a_j}=a_{i+j}$.
Let $f(n)$ be the number of $n$-sequences. Prove that there exist positive real numbers $c_1$, $c_2$, and $\lambda$ such that \[c_1\lambda^n<f(n)<c_2\lambda^n\]for all positive integers $n$.
We prove that $\lambda=3^{1/6}$. For the lower bound, choose $p=\lfloor \frac{n}{6}\rfloor$ and consider all $p$-periodic sequences with $a_0,a_1,\dots,a_{p-1} \le \frac{n}{2}$ and $a_i \equiv i \pmod{p}$. It is easy to see that all of these are $n$-sequences.
Now for each $a_i$ we have at least three choices so that there are at least $3^p \ge \frac{1}{3} \cdot 3^{n/6}$ such sequences. We can therefore choose $c_1=\frac{1}{3}$.
Now let's turn to the upper bound which is more tricky. First of all, note that $a_i=a_j$ immediately implies $a_{i+1}=a_{a_i+a_1}=a_{a_j+a_1}=a_{j+1}$. Hence, if a sequence takes one value twice, it is periodic from that point on.
Let us now first consider the case $a_0>0$. Then $a_{2a_0}=a_0$ so that the sequence is periodic with period $p \mid 2a_0$. Then $a_{a_i+a_j} \equiv a_{i+j}$ is equivalent to $a_i+a_j \equiv i+j \pmod{p}$ so that either $a_i \equiv i \pmod{p}$ for all $i$ or $a_i \equiv i+\frac{p}{2} \pmod{p}$ for all $i$ (if $p$ is even). We only count the sequences in the first case, the same argument shows that in the second case there are even fewer.
If $p>\frac{n}{2}$, the the values $a_k$ for $k \le \frac{n}{2}$ are already uniquely determined by the congruence since $a_k \le \frac{n}{2}$. For the values $a_k$ when $\frac{n}{2}<k<n-\frac{p}{2}$ there are exactly two choices, for larger $k$ again just one. In total, there are at most
\[2^{\frac{n}{2}-\frac{p}{2}} \le 2^{\frac{n}{4}}\]such sequences which is satisfactory, even after summing over all such $p$.
Now if $p<\frac{n}{2}$, we have to count sequences $a_0,a_1,\dots,a_{p-1}$ with $a_i \equiv i \pmod{p}$ and $a_i \le \frac{n}{2}$. But the number of such sequences is simply
\[\left\lceil \frac{\frac{n}{2}}{p}\right\rceil \cdot \left\lceil \frac{\frac{n}{2}-1}{p}\right\rceil \cdot \dots \cdot\left\lceil \frac{\frac{n}{2}-p}{p}\right\rceil.\]Writing $\lfloor \frac{n}{2p}\rfloor=k$, this is $(k+1)^{\frac{n}{2}-kp} \cdot k^{(k+1)^p-\frac{n}{2}}$.
The total contribution is therefore bounded by
\[\sum_{k=1}^{\frac{n}{2}} \sum_{\frac{n}{2(k+1)}<p \le \frac{n}{2k}} (k+1)^{\frac{n}{2}-kp} \cdot k^{(k+1)p-\frac{n}{2}}.\]For fixed $k$, increasing $p$ by $1$ changes this expression by a factor of $\frac{k^{k+1}}{(k+1)^k}$. This is bigger than $1$ iff $k \ge 3$ and smaller than $1$ else. Since these factors are multiplied when $p$ is growing or shrinking, and since the geometric series is convergent, the sum over all such $k$ is bounded by a constant times the maximal value, hence by $(k+1)^{\frac{n}{2(k+1)}}$ for $k=1,2$ and by $k^{\frac{n}{2k}}$ for $k \ge 3$. The contribution from $k \le 3$ is therefore $\ll 3^{\frac{n}{6}}$ and the contribution from $k \ge 4$ is $\ll n \cdot 4^{n/8} \ll 3^{n/6}$.
We have thus obtained a satisfactory estimated when $a_0>0$. Actually, the argument also estimates the number of sequences where $a_0=0$, but the value $0$ occurs again. It thus remains to consider sequences with $a_0=0$ and all other $a_i$ positive.
Now if the sequence does not take one of the values $a_0,\dots,a_d$ twice, but $a_{d+1}$ is taken twice, then from $a_{a_i}=a_i$ we have $a_i=i$ for $i \le d$ and the sequence is periodic from $a_{d+1}$ with period $p \mid a_{d+1}-(d+1)$. The contribution from $p<\frac{n}{2}$ is easily estimated as above. For $p>\frac{n}{2}$ we obtain the number
\[\left\lceil \frac{\frac{n}{2}-d}{p}\right\rceil \cdot \left\lceil \frac{\frac{n}{2}-d-1}{p}\right\rceil \cdot \dots \cdot\left\lceil \frac{\frac{n}{2}-d-p}{p}\right\rceil\]on the number of such sequences, which as above can be estimated as $\ll 3^{\frac{n/2-d}{3}}$ on replacing $\frac{n}{2}$ by $\frac{n}{2}-d$ in the above computation. Summing over $d$, the total contribution is therefore
\[\ll \sum_{d} 3^{\frac{n/2-d}{3}} =3^{n/6} \sum_d 3^{-d/3} \ll 3^{n/6},\]again by the convergence of the geometric series.
f(n)=n
Take,c1>c2
lamba as a constant for c1 and c2 and as a real number
For,n=1
c1lamba<1<c2lamba
For,n=2
c1lamba^2<2<c2lamba^2
Therefore,we can see that f(n) constantly increasing with the c1lamba^2's and c2lamba^2's
increasing rate.
I am not sure I understand. What exactly is the value of lambda that you choose in the end? (Note that clearly the value of $\lambda$, if it exists, must be unique!)
Banglarmanush wrote:
Which part?I am not that much pro in latex so...
if you don't understand a thing just ask me.
Again, what is the value of $\lambda$ in your solution?
This problem is absolutely incredible, but also seriously deranged! I claim the answer is $3^{1/6}$.
Start with any $n$-sequence. Because I said so, we denote $f(i) = a_i$. If all elements of the sequence are distinct then since they all satisfy $a_i \leq n$, it follows that the sequence is a permutation. However it is quite clear that the only viable permutation is $f(i) = i$, so remove this case from consideration.
Now this implies that there exist $a_i = a_j$ such that $i \neq j$. Since we have $f(i+k) = f(a_i + a_k) = f(a_j+a_k) = f(j+k)$ for all viable $k$, it follows that $f$ is $|j-i|$-periodic after index $\min i, j$. Furthermore, $a_n = a_{n - |j-i|}$. Thus we can define the global delta to be the minimal $k$ such that $a_n = a_{n-k}$. By a rough variant of the euclidean algorithm, it follows that if $\Delta(i) = |a_i - i|$ for all $i$, and if $\Delta = \{\Delta(i)\}$ then we must have that the sumset $\Delta + \Delta $ has all elements as multiples of the global delta.
It follows that if the global delta is denoted $d$, then either we have $x \equiv 0 \pmod d$ for all $x \in \Delta$ or $x \equiv \frac{d}{2} \pmod d$ for all $x \in \Delta$. Call these two cases the main and secondary cases, respectively.
Now we call the smallest $k$ such that $\Delta(k) \neq 0$ the divergence index $D$ of the sequence. Suppose $i \geq D$ and $i \leq n - d$, then there exists $j > i$ such that $f(j) = f(i)$. The proof of this claim is left as an exercise, but basically, you can induct down on $i$ in blocks of size $d$ by using the aforementioned variant of the euclidean algorithm. It follows from this approach that the sequence is $d$-periodic after the divergence index $D$ of the sequence.
Hence the sequence is composed of a $a_i = i$ component at the beginning and a periodic section afterward. In the secondary case, it is obvious that there is no $a_i = i$ component. Now if $D > \frac{n}{2}$ then there are at most $2$ choices for each $a_i$, giving $2^d$ which is smaller than the desired exponential bound and thus negligible. If $D < \frac{n}{2}$ then for any element of the sequence, it has a representative appearing in the first half of the $n$-sequence, so it is at most $\frac{n}{2}$. Thus there are at most
$$\prod \limits_{i = 0}^d \left \lfloor \frac{\frac{n}{2} - i}{d} \right \rfloor \leq \left(3^{1/6} \right)^n$$
viable solutions in this case for each $d$. The inequality is derived by brute force suffering, with rough equality at $d = \frac{n}{6}$. When summing over all possible $d$ this gives at most an extra multiplier of $n$ which does not affect the exponential bound.
Next, in the main case, call the primary sequence the first occurrence of a periodic sequence of the $n$-sequence. This can occur up to $d$ indices prior to the divergence index $D$. For instance, $0, 1, 2, 0, 1, 2, \ldots$ has divergence index $3$ but the primary sequence is the first three elements. Let the first element of the primary sequence occur at index $s$, then it can be shown that all elements in the primary sequence are at least $i$ by utilizing the $f(i+k) = f(j+k)$ trick. So let there be $m$ such elements. If $m \leq \frac{n}{2}$ then each element of the primary sequence satisfies $f(i) \leq i$ since $f(i) = i$ for all $i \leq \frac{n}{2}$ and from the problem condition on $i, n-i$. This implies that $f(s) = s$ for all $i$ in the primary sequence, so there is exactly one such choice for each primary sequence. This gives on the order of $n^2$ solutions which is negligible.
Now if $m > \frac{n}{2}$, then suppose there are elements of the primary sequence both before and after $\frac{n}{2}$. Then for each index $i \leq \frac{n}{2}$ in the primary sequence we have that $a_i$ is at least the smallest element of the primary sequence and at most $\frac{n}{2}$, so since this gap is strictly smaller than $d$, we must have that $f(i) = i$. Thus there is no choice for the primary sequence before $\frac{n}{2}$, and they must satisfy $f(i) = i$. Thus by the same logic as the above case, we can conclude that this case is negligible.
Finally, if $m > \frac{n}{2}$ and all indices $i$ in the primary sequence satisfy $i \leq \frac{n}{2}$, it follows that all elements of the primary sequence are at most $\frac{n}{2}$. Hence we have that the total number of solutions in this case is at most:
$$\prod \limits_{i = 0}^d \left \lfloor \frac{\frac{n}{2} - i}{d} \right \rfloor \leq \left(3^{1/6} \right)^n$$
With rough equality at $d = \frac{n}{6}$, finishing the upper bound. The primary case is easily constructible with the assumption of $d = \frac{n}{6}$ and $m = n$, giving the corresponding lower bound and finishing.
We claim that the answer is $\lambda = 3^{\frac{1}{6}}$
Lower Bound:
Take a $k-$periodic sequence where $k = \lfloor \frac{n}{6}\rfloor$ such that $a_i \equiv i (\mod k)$ and $a_i \leq \lfloor{\frac{n}{2}}\rfloor$ so we have exactly $3$ choices for each $a_i$ so the lower bound is established.
Upper Bound:
Claim 1: If $a_i = a_j$ for some $i,j$ then the sequence is periodic from that point onwards
Proof$a_{i+1} = a_{a_i+a_1} = a_{a_j+a_1}=a_{j+1} \blacksquare$
Now, we break into two cases,
Case 1: $a_0 >0$
In this case we have $a_{2a_0} = a_0$ so we have $p \mid 2a_0$ where $p$ is the period, and the second condition translates to $a_i+a_j \equiv i+j (\mod p)$ which means that $a_i \equiv i (\text{mod}\quad p)$ or if $p$ is even, then alternately $a_i \equiv i + \frac{p}{2} (\text{mod} \quad p)$ we deal with the first case as the second case follows from a similar arguement, In this case also we have two cases:
Subcase 1: $p > n/2$
Here, for $i \leq n/2$ the sequence is uniquely determined by congruence, for $n-p/2>i>n/2$ we have 2 choices and for larger it's fixed, so all in all we have $2^{n/2-p/2} < 2^{n/4}$ sequences.
Subcase 2: $p < n/2$
Here, by a similar arguement as in previous case we get $$\lfloor \frac{n/2}{p} \rfloor \cdots \lfloor \frac{n/2-p}{p} \rfloor$$sequences
Let $\lfloor n/2p \rfloor = t$
So the total contribution of this case is bounded by $$\sum_{i=0}^{n/2} \sum (t)^{n/2-tp}(t+1)^{(t+1)p-n/2} $$now this increases by $(t+1)^{t+1}/t^t$ which (at integers) is maximised at $3$, giving this $<<< 3^{n/6}$.
Case 2: $a_0=0$
In this case we have $a_{a_i}=a_i$.
Claim 2: If we have $a_0,a_1 \cdots a_q$ all appearing once but $a_{q+1}$ twice then $a_i$ where $i \in \{0,1 \cdots ,q\}$ is identity.
ProofUsing $a_{a_i} = a_i$, we have the claim established
so the period $p \mid a_{q+1}-q-1$ So the contribution is bounded by
$\lfloor \frac{n/2-d}{p} \rfloor \cdots \frac{n/2-d-p}{p}$ which again is bounded by $3^{n/6}$ so we're done.
I'm not sure how one can finish this problem with complete details written within 3 hrs.
I haven't noticed that 800th post is done already, anyway, just use 801th post as a nice Chinese lunar new year start
Viewing it as a functional equation really helps a lot.