Learn / Library / Mental math
Representations as a gap of squares
In how many ways can be written as , where and are non-negative integers with ? Different pairs count as different ways.
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Factor as and think about parity.
Solution
- Since , we need factor pairs with .
- The pairs are , and , all with both factors odd, so and are integers.
- These give , and .
- So there are ways.
Answer: