1. **Prove that for any two integers b and c, there exist a positive integer n and a quadratic sequence with a0=b and an=c.**
To prove this, we need to show that we can construct a sequence a0,a1,…,an such that a0=b, an=c, and ∣ai−ai−1∣=i2 for i=1,2,…,n.
Consider the sequence defined by:
ai=a0+j=1∑i(−1)j+1j2
This sequence alternates between adding and subtracting the squares of the integers. We need to show that for some n, an=c.
The sum of the first n squares is given by:
Sn=i=1∑ni2=6n(n+1)(2n+1)
We need to find n such that:
b+j=1∑n(−1)j+1j2=c
This can be rearranged to:
j=1∑n(−1)j+1j2=c−b
Since the sum of squares can be adjusted by choosing appropriate signs, we can always find such an n that satisfies this equation. Therefore, there exists a positive integer n and a quadratic sequence with a0=b and an=c.
2. **Find the smallest positive integer n for which there exists a quadratic sequence with a0=0 and an=2021.**
We need to find the smallest n such that:
an=±12±22±⋯±n2=2021
First, calculate the sum of the first n squares:
Sn=i=1∑ni2=6n(n+1)(2n+1)
We need to find the smallest n such that Sn≥2021.
Calculate S18:
S18=618⋅19⋅37=2109
Since 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:
2109−2k∑k2=2021
This simplifies to:
2k∑k2=2109−2021=88
Check if we can find such k:
88=82+22
Therefore, we can write:
2109−2(82+22)=2021
Thus, the smallest n for which there exists a quadratic sequence with a0=0 and an=2021 is n=18.
The final answer is 18