For some positive integer $n$, there exists $n$ different positive integers $a_1, a_2, ..., a_n$ such that $(1)$ $a_1=1, a_n=2000$ $(2)$ $\forall i\in \mathbb{Z}$ $s.t.$ $2\le i\le n, a_i -a_{i-1}\in \{-3,5\}$ Determine the maximum value of n.
Problem
Source: Korean National Olympiad P5
Tags: combinatorics, Integer sequence
07.02.2021 00:25
|16385274|...|16385274| |1993 1996 1999 1994 1997 2002 2007 2004 2009 2006 2003 2008 2005 2000| gives 1992 + 14 = 2006?
16.11.2022 17:29
Easy to check $a_{i+2}-a_i \equiv 2(\mod 8) \forall i \geq 1$. Therefore, $8 \mid a_{i+8}-a_i$ Since $a_1,a_2,...,a_n$ are different, we have $n \leq 2000$. Moreover, from $a_1$ to $a_8$ we see that only $8 \mid a_4$ Therefore, $8 \mid a_i \Leftrightarrow i \equiv 4(\mod 8)$ $\Rightarrow n \equiv 4(\mod 8)$ Because $n \leq 2000$, we see that $n \leq 1996$. We will give a case when $n=1996$. Considering $(a_n): a_n=\begin{cases} n \text{ if } 2 \nmid n \\ n+4 \text{ if } 2 \mid n \end{cases}$ We see that there are not $2$ indexes $i,j$ such that $a_i=a_j$, and $a_{1996}=1996+4=2000$, so the maximum value of $n$ is $1996$. Note: Maybe this solution isn't correct
16.11.2022 20:31
iammocnhan wrote: Easy to check $a_{i+2}-a_i \equiv 2(\mod 8) \forall i \geq 1$. Therefore, $8 \mid a_{i+8}-a_i$ Since $a_1,a_2,...,a_n$ are different, we have $n \leq 2000$. Moreover, from $a_1$ to $a_8$ we see that only $8 \mid a_4$ Therefore, $8 \mid a_i \Leftrightarrow i \equiv 4(\mod 8)$ $\Rightarrow n \equiv 4(\mod 8)$ Because $n \leq 2000$, we see that $n \leq 1996$. We will give a case when $n=1996$. Considering $(a_n): a_n=\begin{cases} n \text{ if } 2 \nmid n \\ n+4 \text{ if } 2 \mid n \end{cases}$ We see that there are not $2$ indexes $i,j$ such that $a_i=a_j$, and $a_{1996}=1996+4=2000$, so the maximum value of $n$ is $1996$. Note: Maybe this solution isn't correct the conclusion $n$ is at most 2000 is not necessary correct. for example, the sequence of numbers can go to numbers that are more than 2000 and then decreases back to 2000.