Determine all positive integers $n$, $n\ge2$, such that the following statement is true: If $(a_1,a_2,...,a_n)$ is a sequence of positive integers with $a_1+a_2+\cdots+a_n=2n-1$, then there is block of (at least two) consecutive terms in the sequence with their (arithmetic) mean being an integer.
Problem
Source: USA January TST for IMO 2012, Problem 3
Tags: induction, arithmetic sequence, strong induction, combinatorics
24.08.2013 04:14
Note that I read it as: You can find a sequence so that no arithmetic sequence is an integer. My solution still is correct for the problem though.
24.08.2013 06:44
25.08.2013 03:24
yugrey wrote: For $n \ge 4$, the first $n-2$ terms and similarly the last $n-2$ have sum at most $2n-5$ Why? I see asolutely no reason, why would sum of first $k$ numbers in any way limit the sum of the last. Or am I missing something? And by the way, how did you come up with this idea? It's so unintuitive...
10.10.2013 04:33
Note the "similarly." It is the exact same argument.
19.03.2016 17:08
Note that if the sum for some $k$ consecutive numbers of the sequence is $2k$ we are finished. Now it can't be $a_1+a_2+\dots+a_{n-1}=2n-2$ so we conclude $a_1+a_2+\dots+a_{n-1}\le 2n-3$. Now we have that $a_1+\dots + a_{n-1}>a_1+\dots+a_{n-2}$ so we conclude $a_1+a_2+\dots +a_{n-2} \le 2n-5$. By continuing like this we get $a_1+a_2 \le 3$. Now for $n=2$ and $n=3$ examples are $ 2 1 $ and $2 1 2$. For $n=4$, $n=5$ we can easily show that there has to be an arithmetic mean that is an integer. Now for $n\ge6$ if $a_1+a_2=2$ we are finished and if $a_1+a_2=3$ then $a_3+\dots+a_n=2n-4$ we are finished by induction(because $n-2\ge4$). So the answer is for all $n\ge4$. My solution is very similar to yugrey's and I think it is very intuitive because you can just notice these things. He just wrote it more professional.
13.10.2018 20:11
Unless I made some mistake it's neither casebashy nor hard.
10.11.2018 05:34
I think this is different from aboves:
14.07.2020 11:50
Groupsolve with TOMITTAL and Mathotsav First we replace $a_i$ by $a_i-1$ to get a new equivalent problem- New Probelem wrote: Determine all positive integers $n$, $n\ge2$, such that the following statement is true: If $(a_1,a_2,...,a_n)$ is a sequence of non-negative integers with $a_1+a_2+\cdots+a_n=n-1$, then there is block of (at least two) consecutive terms in the sequence with their (arithmetic) mean being an integer. Solution- We will show that it is true for all $n>3$ For $n=2,3$ the following sequences are counter examples - $(1,0),(1,0,1)$ Now we will prove a more general result - Result- wrote: For $n>1$ if we have a sequence $(a_1,a_2,....,a_n)$ of non-negative integers with $a_1+a_2+....+a_n=n-k$ where $0\leq k \leq \lfloor \dfrac{n}2 \rfloor-1 $. Then there exists a block of $l$ consecutive terms with sum $l$ for some $1<l\leq n$ Proof- Assume for the sake of Contradiction that such a block does not exist. Define $b_0=0$ and $b_i=i-(a_1+a_2+...+a_i)$ Claim 1 - $b_{i+1}-b_i\leq 1$ $b_{i+1}-b_i=1-a_{i+1}\leq 1$ Claim 2 - If $b_i=x$ and $b_j=y$ and $i<j , x<y$ then all values between $x$ and $y$ are taken by some $b_t$ for $i<t<j$. Follows directly from Claim 1 Claim 3 - If $b_i=b_j$ then $|i-j|\leq 1$ Let $b_i=b_j$ and $j>i$ , so $b_j-b_i=0 \implies (j-i) - (a_{i+1}+...+a_j) = 0 \implies (a_{i+1}+...+a_j)=j-i $ And so by our assumption that such a block of lenght $>1$ cannot exist we get that $j-i=1$ Claim 4 - $b_i$ is non-decreasing. We know that $b_n=k \geq 0 =b_0$ and hence if $b_i$ is decreasing at some point then it must be increasing at some other point. So we get $i<j<k$ such that $a_i,a_k>a_j$ , now by claim 2 there exists $s,t$ , such that $i\leq s<j<t\leq k$ and $a_s=a_j-1=a_t$ , contradicting claim 3. Thus we get that the $b_i$ are all from $\{0,1,..,k\}$ , but from claim 3 we have that each number can only occur twice. And hence $n+1 \leq 2(k+1) \implies n<2k+2 \implies \lfloor \dfrac{n}2 \rfloor<k+1$ Contradiction, Hence proved. Note : The bound on $k$ is strong . This can be seen by considering the sequence $(1,0,1,0,...)$ Further see that $1\leq \lfloor \dfrac{n}2 \rfloor-1$ holds only for $n>3$ and hence our original problem is also solved.
09.09.2020 16:24
The answer is all $n$ except $n = 2$ and $n = 3$, for which we may pick the sequences $2, 1$ and $2, 1, 2$. We say a sequence $(a_1, \ldots , a_n)$ is exceptional if there is no block of consecutive terms whose average is an integer. We prove that for $n \ge 4$ there is no exceptional sequence whose elements have sum $2n-1$ by proving the following stronger result. Claim. Let $(a_1, \ldots , a_n)$ be an exceptional sequence. Assume $a_1 + \ldots + a_n \le 2n-1$. Then $a_1 + \ldots + a_n \le \frac{3n+1}{2}$ (i.e. the sequence is of the form $1, 2, 1, 2, \ldots$ or $2, 1, 2, 1, \ldots$). We prove the claim by strong induction on $n$. The base cases $n = 1, 2, 3$ are trivial. Assume $n \ge 4$. For the induction step, first note that if $a_1 + \ldots + a_n \le 2n-1$, then for any $k$ we have either $a_1 + \ldots + a_k \le 2k-1$ or $a_{k+1} + \ldots + a_n \le 2(n - k) - 1$. Apply this for $k = \lfloor n/2 \rfloor$ and abuse symmetry to deduce that $a_1 + \ldots + a_{\lfloor n/2 \rfloor} \le 2\lfloor n/2 \rfloor - 1$. By the induction assumption this implies that the numbers $a_1, a_2, \ldots , a_{\lfloor n/2 \rfloor}$ alternate between $1$ and $2$. We now assume that $a_1, a_2, \ldots$ does not alternate between $1$ and $2$ and aim for contradiction. Let $m$ be the smallest integer such that $a_m \not\in \{1, 2\}$, so $m \ge \lfloor n/2 \rfloor + 1 \ge 3$. The crucial observation is that $a_m$ must be quite large. We first prove a weaker result in this direction and the prove a stronger result which is sufficient for a contradiction. The first result is. \begin{align*} a_m \ge \lfloor \frac{m}{2} \rfloor + 3. \end{align*}Let $k \ge 1$ be an integer such that $2k \le m$. Now \begin{align*} \frac{a_{m - 2k} + a_{m - 2k + 1} + \ldots + a_{m-1} + a_m}{2k+1} = \frac{3k + a_m}{2k+1} = 1 + \frac{k-1 + a_m}{2k+1}, \end{align*}so $a_m \neq k+2$. Applying this for $k = 1, 2, \ldots , \lfloor \frac{m}{2} \rfloor$ yields the desired lower bound for $a_m$. We then note that since $a_1 + \ldots + a_{m-1} \ge \frac{3(m-1) - 1}{2}$, we have \begin{align*} a_{m+1} + \ldots + a_n = (a_1 + \ldots + a_n) - (a_1 + \ldots + a_m) \le 2n - 1 - \left(\frac{3(m-1) - 1}{2} + \lfloor \frac{m}{2} \rfloor + 3\right) \le 2(n-m) - 1, \end{align*}so by the induction hypothesis the numbers $a_{m+1}, \ldots , a_n$ must alternate between $1$ and $2$. Furthermore, $a_{m+1} = a_{m-1}$ by considering parities. We now prove a stronger lower bound for $a_m$ than the one before, namely that \begin{align*} a_m \ge \lfloor \frac{n}{2} \rfloor + 1. \end{align*}We use a similar trick as for the previous lower bound but "in two directions". Let $e(m) = 0$ if $a_{m-1} = 1$ and $e(m) = 1$ if $a_{m-1} = 2$. For $k \ge 1$ an integer with $2k \le n$ we have \begin{align*} \frac{a_1 + a_2 + \ldots + a_{2k}}{2k} = \frac{3k - e(m) + a_m}{2k} = 1 + \frac{k - e(m) + a_m}{2k}, \end{align*}and hence $a_m \neq k + e(m)$. Applying this for $k = 1, 2, \ldots , \lfloor n/2 \rfloor$ gives the stronger lower bound for $a_m$. Finally, use the obtained bound to get \begin{align*} a_1 + \ldots + a_n = (a_1 + \ldots + a_{m-1}) + a_m + (a_{m+1} + \ldots + a_n) \ge \frac{3(m-1) - 1}{2} + \lfloor \frac{n}{2} \rfloor + 1 + \frac{3(n - m) - 1}{2} = \frac{3(n-1)}{2} + \lfloor \frac{n}{2} \rfloor > \frac{3(n-1)}{2} + \frac{n}{2} = 2n - 3/2. \end{align*}Hence $a_1 + \ldots + a_n \ge 2n-1$. This is almost enough. To get rid of the equality case, note that $a_m = \lfloor n/2 \rfloor + 1$ can happen only if $e(m) = 1$, i.e. if $a_{m-1} = 2$. In this case $a_1 + \ldots + a_{m-1} \ge 3(m-1)/2$ and $a_{m+1} + \ldots + a_n \ge 3(n-m)/2$, yielding an additional $+1$ term for the lower bound. Remark. A simpler proof of the claim can be given by an easy casework on the values of $a_1$, see post #8.
22.05.2021 07:24
Solution from stream: The answer is all $n\ge 4$. Note $n=2,3$ fail because of $(1,2)$, $(2,1,2)$ respectively. Assume for contradiction for some $n\ge 4$, there exist a sequence that doesn't satisfy the statement in the question. Lemma 1. For all integers $k\ge 1, \sum\limits_{j=i+1}^{i+2^k} a_j \equiv 2^{k-1} (\bmod\; 2^k)$ Proof. We proceed by induction on $k$. The base case, $k=1$ is true because otherwise $2\mid a_i+a_{i+1}$ results in a contradiction. Inductive Step: We consider $\sum\limits_{j=i+1}^{i+2^{k-1}} a_j \equiv \{ 2^{k-2}, -2^{k-2} \} (\bmod\; 2^k)$, which is a restatement of the inductive hypothesis on $k-1$. Now, note $$\sum\limits_{j=i+1}^{i+2^{k-1}} a_j + \sum\limits_{j=i+1+2^{k-1}}^{i+2^k} a_j = \sum\limits_{j=i+1}^{i+2^k} a_j$$cannot be divisible by $2^k$, so we are good. A corollary of this lemma is that $a_i\equiv a_{i+2^k} (\bmod\; 2^k)$. Consider a sequence $b_i$ with alternating $2$'s and $1$'s with odd sum (if $4\mid n$, then we clearly lose because we can group $a_i$ into $\frac n2$ groups with odd sum, which has an even total sum). Notice $$\sum b_i=\frac{3n - Im(i^n)}{2}\ge \frac{3n-1}{2}$$ Now, suppose $a_i>b_i$ for some $i$. Obviously, $a_i\equiv b_i(\bmod\; 2)$ (in the case where $n$ is 2 mod 4, we can reverse the sequence to make this true) Let $k=\nu_2(a_i-b_i)$. Observe that the sum of any continuous $2^{k+1}$ elements must have incremented by at least $2^{k+1}$ for mod $2^{k+1}$ reasons by our lemma. We can easily bound to prove $\sum\limits_{i=1}^n (a_i-b_i) \ge 2^{k+1} \max\{\lfloor \frac{n}{2^{k+1}}\rfloor, 1\}$. If $2^{k+1}>\frac n2$ we're trivially done, otherwise, $2^{k+1} \lfloor \frac{n}{2^{k+1}}\rfloor \ge n-2^{k+1} > \frac{n-1}{2}$ for all $n\ge 5$, so we win. Motivational Remarks: Note alternating sequences of two consecutive numbers work if the sum condition is not given. This is an algebraic estimation/bounding problem, because the $\sum a_i=2n-1$ is also a strong condition. Note the $(1,2,1,2,)$'s serve as a basis, for $a_i$ is at least $b_i$ for all $i$. Now, note $2\nmid a_i+a_{i+1}$ is a very STRONG condition, which gives away a lot about parity information. Then we can extend to $4\nmid a_i+a_{i+1}+a_{i+2}+a_{i+3}$ and so on, so on. The equality cases may also be a good starting place.
22.05.2021 11:48
n≠1. Counter examples: n=2 - (1,2) n=3 - (2,1,2) Let n≥4, n can be 4k, 4k+1, 4k+2, 4k+3 for some k≥1. Let us construct the sequence where no blocks exists with the required property and call them 'rebel'. For any two terms a,b, (a+b)/2 to be an integer a, b must have opposite parity. (a,b) can be (odd, even) or (even,odd) Consider the first 4 terms: (odd, even, odd, even) or (even, odd, even, odd) Let (a,b,c,d) is denoted by abcd. So first 4 terms mod 4 are: 1010 1012 1212 10-10 10-12 12-12 -10-10 -10-12 -12-12 We can't have the sum 0 mod 4, as then their means will be an integer. We are left with the possiblities: 1010 10-12 -10-10 Observe that the full sequence is the concatenation of these terms + (1 or 2 or 3) terms. Consider the case where all evens are 0 mod 4. => their minimum value = 4. So the minimum of the sequence = 4×(no. of. min. even terms) + sigma odds = 4(n-1)/2 + sigma odds = 2n-2 + sigma odds > sigma sequence = 2n-1 (given). A Contradiction. Hence we are left with the possiblilty 10-12. The min sum of first 4 terms = 1+2+3+4 = 10. => Possible sum of the sequence = (10k or 10k+1 or 10k+3 or 10k+6) + sigma odds > Sum of the sequence = 2n-1 = (8k-1, 8k+1, 8k+3, 8k+5) Therefore, there is no 'rebel' and the question statement is true for all n≥4. (ANY MISTAKES?)
04.10.2022 17:39
The answer is : $n \geq 4$ We can easily see that for $n=2$ and $n=3$ $(1,2)$ and $(2,1,2)$ contradicts. Assume contrary for $n\geq 4$ Claim:$a_1+a_2+...+a_i \leq 2i$ Proof:Take maximal $i$ doesn't obey the claim.Obviously $i\not =n$ We have $a_1+a_2+...a_i \geq2i+1$ and $a_1+a_2+...a_i+a_{i+1} \leq 2i+2$ $\rightarrow$ $a_1+a_2+...a_i+a_{i+1} =2i+2$ .Contradiction. Then $a_1\leq 2$ if $a_1=1$ then $n-1|a_2+a_3+...+a_n$ contradiction.If $a_1=2$ then $a_1+a_2 \leq 4$ if $a_2=2$ $2|a_1+a_2$ contadiction . If $a_2=1$ then $n-2|a_3+a_4+...+a_n$ contradiction . $\blacksquare$
15.07.2023 11:03
The answer is all integers larger than $3$. When $n=2$, take $(a_1,a_2)=(1,2)$. When $n=3$, take $(a_1,a_2,a_3)=(2,1,2)$. Check that no block of consecutive terms have integer arithmetic means. Now we give the following claim, which is in fact a stronger result. Claim: Assume $n$ is an integer larger than $3$, and $a_1,\dots,a_n$ are $n$ positive integers with sum $2n-1$. There exist integer $1\leq i<j\leq n$, such that $\sum\limits_{k=i}^{j}a_k=2(j-i+1)$ Proof of the claim: For $1\leq k \leq n$, define $S_k=\sum\limits_{t=1}^{k}a_t$, also set $S_0=0$. Therefore $S_n=-1$, and note that $S_{k}-S_{k-1}=a_{k}-2\geq -1$ for $1\leq k\leq n$. Our goal is to find $S_i=S_j$ with $0\leq i<i+1<j\leq n$. Since $S_{n-1}\leq S_n+1=0$, we have the following cases. Case 1: $S_{n-1}=0$ $S_0=S_{n-1}=0$, done. Case 2: $S_{n-1}<-1$ Because $S_0=0$ and $S_{n-1}<-1$, there exists $1\leq i<n-1$ such that $S_i=-1$. Thus $S_i=S_n=-1$, done. Case 3: $S_{n-1}=-1$ In this case $S_{n-2}\leq S_{n-1}+1=0$, we have three subcases. Subcase 1: $S_{n-2}=0$ $S_{n-2}=S_0=0$ and $n-2\geq 2$, done. Subcase 2: $S_{n-2}=-1$ $S_{n-2}=S_n=-1$, done! Subcase 3: $S_{n-2}<-1$ Analogously there exists $1\leq i<n-2$ such that $S_i=-1$, hence $S_i=S_n$, done. We have exausted all cases, therefore the claim is proved. $\blacksquare$ Remark: The idea of this solution is somehow similar to https://artofproblemsolving.com/community/c6h407372/url]