Number theoryDifficulty 7.6National olympiad, round 2Prove it
Let n≥0 be an integer. A sequence a0,a1,a2,… of integers is defined as follows: a0=n and for k≥1, ak is the smallest integer greater than ak−1 such that ak+ak−1 is the square of an integer. Prove that there are exactly ⌊2n⌋ positive integers that cannot be written in the form ak−aℓ with k>ℓ≥0.
Solution
Let m=⌊2n⌋. We first prove that the sequence of squares a0+a1,a1+a2, ... is exactly the sequence (m+1)2,(m+2)2,…. Then we show that the differences ai−ai−1 form a sequence of consecutive even numbers and a sequence of consecutive odd numbers. With this, we can then prove the required statement. Note that a0+a1 is the smallest square greater than 2n. Therefore, a0+a1=(m+1)2. We now prove by induction on i that ai−1+ai=(m+i)2. For i=1, we have just proven this. Suppose that aj−1+aj=(m+j)2. This means that aj−1≥2(m+j−1)2 (otherwise, aj could have been chosen such that aj−1+aj=(m+j−1)2) and thus
We have b1+b2=(a2−a1)+(a1−a0)=(a2+a1)−(a1+a0)=(m+2)2−(m+1)2=2m+3. In particular, b1 and b2 have different parities. Now, at least all numbers with the same parity as b1 and at least as large as b1 can be written as ak−ak−1 for some k. The same holds for the numbers with the same parity as b2 and at least as large as b2. All numbers of the form ak−aℓ with k≥ℓ+2 are at least as large as bk+bk−1≥b1+b2 and thus larger than b1 and larger than b2. In this way, we can no longer generate new numbers. The numbers that cannot be written as ak−aℓ with k>ℓ≥0 are thus exactly the numbers with the same parity as b1 and smaller than b1 and the numbers with the same parity as b2 and smaller than b2. This is a total of
⌊2b1−1⌋+⌊2b2−1⌋
numbers, where within the brackets of the floor function, exactly one of the two times is an integer. We can thus write this as
2b1−1+2b2−1−21=2b1+b2−3=22m=m.
There are thus exactly m=⌊2n⌋ positive integers that cannot be written in the required form.
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.
Source: NuminaMath-1.5,
licensed Apache-2.0.
Statement and solution reproduced as published; topic and difficulty added by this site.