Find a sequence of 29 positive integers $a_1, ... , a_{29}$ such that $a_1+...+a_{29} = 49$ and no consecutive string of numbers in this sequence adds up to 10.
And prove that this sequence is the only one that satisfies this condition.
I know how to prove a statement like this: $a_1, ..., a_{20}$ are positive integers that sum to 30 and some consecutive group of these numbers is equal to 9. Using the pigeonhole principle.
Applying the idea I used for that to this problem, I begin by defining
$b_n = \sum^n_{i=1} a_i$. Therefore, $b_{29} = 49$
I want to find a sequence of numbers such that for all $m > n$ $b_m - b_n= \sum^m_{i=n+1}a_i$ never equals 10.
Defining $c_n = b_n + 10$
I think I need to prove that $c_n \neq b_n$ for all n.
I am stuck here.
lulu has provided sufficient hints to solve the problem.
For $n=1, 2, \cdots, 29, \text{ }$define
$$b_n= \sum_{i=1}^n a_i$$
Notice that
$(i)$ $\{b_n\}$ is strictly increasing,
$(ii)$ $\color{red}{1 \leq b_n \leq 49}$
Next for $k = 0, 1, 2, \cdots, 9$,
define $\color{red}{\left[k \right]= \left\{ b_n\text{ }| b_n \equiv k \text{ } (\mathrm{mod} 10) \right\}}$
Note that
$(1)$ Different elements of $[k]$ differ by multiples of $10$.
$(2)$ Consecutive elements of $[k]$ differ by at least $20$
Reason: If $b_p, b_q \in [k]$ and $b_q-b_p=10$, then $\sum_{i=p+1}^q a_i=b_q-b_p=10$. This is not acceptable.
$(3)$ Each $[k]$ contains at most $3$ elements.
Reason: Suppose that $[k]$ contains $4$ elements $b_p \lt b_q \lt b_r \lt b_s$. From $(2)$, $b_s \geq b_p+60$. This contradicts the fact that $b_s \leq 49$.
$(4)$ $[0]$ contains at most $2$ elements.
Reason: The least element of $[0]$ cannot be $0$ and $10$. So the least element is $ \geq 20$. The next element would then be $ \geq 40$. It cannot contain a third element which is $ \geq 60$.
$(5)$ Since $[0]$ has at most $2$ elements, the total number of elements assigned to $[k]_{}$, $k = 1, 2, \cdots, 9$ is at least $27$.
$(6)$ But each $[k]$ has at most $3$ elements.
$(7)$ Therefore for $k = 1, 2, \cdots,9 \text{ }$ each $[k]$ has exactly $3$ elements and $[0]$ has exactly $2$.
$(8)$ For$\text{ } k = 1, 2, \cdots, 9, \color{red}{\text{ }[k]=\left \{k, k+20, k+40 \right \} }$
Proof: For example if the least element of $[3]$ is not $3$. Then the least element has to be $\geq 13$, the next one would be $\geq 33$ and the last one would be $\geq 53$. This is not acceptable. Thus the first element must be $3$ and the next $2$ can only be $23$ and $43$.
$(9)$ $\color{red}{[0]= \left\{ 20, 40 \right\}}$
$(10)$ Since $\{b_n\}$ is strictly increasing, $(8)$ and $(9)$ uniquely determine the values of $b_n$'s as follows:
$$\left(b_1, b_2, \cdots, b_9 \right) = \left(1, 2, \cdots 9\right), $$
$$\left(b_{10}\right) =\left( 20\right), $$
$$\left(b_{11}, b_{12}, \cdots, b_{19}\right) =\left( 21, 22, \cdots 29\right), $$
$$\left(b_{20}\right) =\left( 40\right) \text{ } \mathrm{and} $$ $$\left(b_{21}, b_{22}, \cdots, b_{29} \right) = \left(41, 42, \cdots 49\right) . $$
$(11)$ Thus
$$a_1=a_2= \cdots = a_9=1$$ $$a_{10}=11$$ $$a_{11}=a_{12}= \cdots = a_{19}=1$$ $$a_{20}=11 \text{ }\mathrm{and}$$ $$a_{21}=a_{22}= \cdots = a_{29}=1$$