A finite sequence of integers $ a_0, a_1, \ldots, a_n$ is called quadratic if for each $ i$ in the set $ \{1,2 \ldots, n\}$ we have the equality $ |a_i - a_{i-1}| = i^2.$ a.) Prove that any two integers $ b$ and $ c,$ there exists a natural number $ n$ and a quadratic sequence with $ a_0 = b$ and $ a_n = c.$ b.) Find the smallest natural number $ n$ for which there exists a quadratic sequence with $ a_0 = 0$ and $ a_n = 1996.$
Problem
Source: IMO Shortlist 1996, N3
Tags: number theory, Integer sequence, Perfect Squares, Extremal combinatorics, recurrence relation, IMO Shortlist
11.09.2008 23:47
" wrote: first of all note that the existance of such a sequence with $ a_0,a_n$ is equivalent to the existance of numbers $ \epsilon_i$ for $ 1\leq i\leq n$ in which $ \epsilon_i=\pm 1$ and also: $ a_n-a_0=\sum_{i=1}^n\epsilon_ii^2$ a.)first of all note that: $ n^2-(n+1)^2-(n+2)^2+(n+3)^2=4$ now it's sufficient to show that the number $ c-b$ can be written as $ \sum_{i=1}^n \epsilon_ii^2$,we will prove this in the case $ c-b>0$ the other cases can be shown similarly: let $ r$ be the remainder of $ c-b$ divided by $ 4$,now we have 4 cases: $ 1)r=0\Rightarrow c-b=(1^2-2^2-3^2+4^2)+(5^2-6^2-7^2+8^2+\ldots$ in which the number of parenthesis are $ \frac{c-b}4$. $ 2)r=1\Rightarrow c-b=1^2+(2^2-3^2-4^2+5^2)+(6^2-7^2-8^2+9^2)+\ldots$ there are $ \frac{c-b-1}4$ parenthesis. $ 3)r=2\Rightarrow c-b=(-1^2-2^2-3^2+4^2)+(5^2-6^2-7^2+8^2)+(9^2-10^2-11^2+12^2)+\ldots$ there are $ 1+\frac{c-b-2}4$ parenthesis. $ 4)r=3\Rightarrow c-b=-1^2+2^2+(3^2-4^2-5^2+6^2)+(7^2-8^2-9^2+10^2)+\ldots$ there are $ \frac{c-b-3}4$ parenthesis. b.)first of all note that from the definition of $ a_n$ and the fact that $ a_0=0$,we obtain that: 1.)$ a_k\leq 1^2+2^2+\cdots +k^2=\frac{k(k+1)(2k+1)}6$ and 2.)$ a_k\equiv 1^2+2^2+\cdots +k^2\pmod 2$ now from 1.) we get that $ a_{17}\leq 1785$ hence $ n\geq 18$ and also by 2.) we get that $ a_{18}\equiv 2109\pmod 2$ but $ 1996$ is even,so $ n\neq 18$,so we must have $ n\geq 19$,now we will show that for $ n=19$ such sequence exists: note that: $ 1^2+2^2+\cdots +19^2=2470=1996+474$ so it's sufficient to write $ \frac{474}2=237$ as sum of some distinct perfect squares for example $ 237=14^2+5^2+4^2$,so we have: $ 1996=1^2+2^2+3^2-4^2-5^2+6^2+7^2+\cdots +13^2-14^2+15^2+\cdots +19^2$ QED