Maths Olympiad Prep

Track / Stage 7 / 121 of 300 #1521 of 1964

Problem 1521

National olympiad second round; IMO P1/P4
Number theory Difficulty 7.2 Find the answer

A finite sequence of integers a0,,a1,,ana_0,,a_1,\dots,a_n is called quadratic if for each i{1,2,n}i\in\{1,2,\dots n\} we have the equality aiai1=i2|a_i-a_{i-1}|=i^2.

(i)\text{(i)} Prove that for any two integers bb and cc, there exist a positive integer nn and a quadratic sequence with a0=ba_0=b and an=ca_n = c.

(ii)\text{(ii)} Find the smallest positive integer nn for which there exists a quadratic sequence with a0=0a_0=0 and an=2021a_n=2021.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Official solution

1. **Prove that for any two integers b b and c c , there exist a positive integer n n and a quadratic sequence with a0=b a_0 = b and an=c a_n = c .**

To prove this, we need to show that we can construct a sequence a0,a1,,an a_0, a_1, \ldots, a_n such that a0=b a_0 = b , an=c a_n = c , and aiai1=i2 |a_i - a_{i-1}| = i^2 for i=1,2,,n i = 1, 2, \ldots, n .

Consider the sequence defined by:
ai=a0+j=1i(1)j+1j2 a_i = a_0 + \sum_{j=1}^i (-1)^{j+1} j^2
This sequence alternates between adding and subtracting the squares of the integers. We need to show that for some n n , an=c a_n = c .

The sum of the first n n squares is given by:
Sn=i=1ni2=n(n+1)(2n+1)6 S_n = \sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}
We need to find n n such that:
b+j=1n(1)j+1j2=c b + \sum_{j=1}^n (-1)^{j+1} j^2 = c
This can be rearranged to:
j=1n(1)j+1j2=cb \sum_{j=1}^n (-1)^{j+1} j^2 = c - b
Since the sum of squares can be adjusted by choosing appropriate signs, we can always find such an n n that satisfies this equation. Therefore, there exists a positive integer n n and a quadratic sequence with a0=b a_0 = b and an=c a_n = c .

2. **Find the smallest positive integer n n for which there exists a quadratic sequence with a0=0 a_0 = 0 and an=2021 a_n = 2021 .**

We need to find the smallest n n such that:
an=±12±22±±n2=2021 a_n = \pm 1^2 \pm 2^2 \pm \cdots \pm n^2 = 2021
First, calculate the sum of the first n n squares:
Sn=i=1ni2=n(n+1)(2n+1)6 S_n = \sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}
We need to find the smallest n n such that Sn2021 S_n \geq 2021 .

Calculate S18 S_{18} :
S18=1819376=2109 S_{18} = \frac{18 \cdot 19 \cdot 37}{6} = 2109
Since 2109>2021 2109 > 2021 , we check if we can adjust the sum to get exactly 2021.

We need to subtract twice the sum of some perfect squares from 2109 to get 2021:
21092kk2=2021 2109 - 2 \sum_{k} k^2 = 2021
This simplifies to:
2kk2=21092021=88 2 \sum_{k} k^2 = 2109 - 2021 = 88
Check if we can find such k k :
88=82+22 88 = 8^2 + 2^2
Therefore, we can write:
21092(82+22)=2021 2109 - 2(8^2 + 2^2) = 2021
Thus, the smallest n n for which there exists a quadratic sequence with a0=0 a_0 = 0 and an=2021 a_n = 2021 is n=18 n = 18 .

The final answer is 18 \boxed{ 18 }

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.