The numbers and are a pair of consecutive positive squares whose difference is . How many pairs of consecutive positive perfect squares have a difference of less than or equal to ?
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
Consecutive squares differ by (n+1)^2 - n^2 = 2n+1, so the condition 2n+1 <= 2023 means n = 1, 2, ..., 1011.
Solution
A pair of consecutive positive squares is and with . Their difference is
We need , i.e. . Each gives exactly one pair (and works since ), so there are pairs.
The answer is .
Why this works
The difference of consecutive squares is the odd number , so "difference at most " is a linear condition on and the count is immediate. Always name the pair by a single index () so that counting pairs becomes counting integers in a range.
The trap
Using a strict inequality or starting from n = 0, which shifts the count to 1010 or 1012.
Common mistakes
- Using a strict inequality or starting from n = 0, which shifts the count to 1010 or 1012.
- Counting odd numbers up to ( of them, including ) without noticing that difference would require , which is not positive.
Techniques
Apply an identity: SFFT, sum of squares, difference of cubes, Vieta · Bound the quantity above/below or estimate to pin it down