Find all positive integers n such that there exist n consecutive positive integers whose sum is a perfect square.
Problem
Source: International olympiad of metropolises 2016
Tags: number theory, IOM
08.09.2016 10:16
say the starting integer is a, then the sum is n(n+2a−1)2 note that if n is odd and a=n+12, the sum is then n2, so there are infinitely many n, not sure when n is even, still calculating
08.09.2016 14:59
Write n in the form n=2k(2m+1) with integers k,m≥0. Answer: such a square exists if and only if (i) k=0 or (ii) k is odd. (1) If k=0, then pick a=m+1. (2) If k is odd, then let x2 be a square that is strictly larger than 2k. Pick a so that 2a−1=(2m+1)(y2−2k). (3) If k≥2 is even, then 12n(n+2a−1) is divisible by 2k−1 but not 2k, and cannot be a square.
13.09.2016 22:38
Notice that the sum of all these numbers, say k+1,…,k+n equals S=nk+n(n+1)2. Now, if n is odd we set n=2m−1. Clearly, setting k=(2m−1)⋅s2−m for a sufficiently large s yields that S=((2m−1)s)2 is a perfect square. If u=v2(n)>0 then set n=2u⋅v for v odd and see that S=2u−1⋅(2k+v⋅(2u⋅v+1)) and v2(S)=u−1 must be even. Thus u must be odd. Now, take k=(2l+1)2−v⋅(2u⋅v+1)−12 for l sufficiently large. Clearly, k is an integer and S=(2u−12⋅l)2 is a perfect square. The discussion concludes and we see that the only such n are those for which v2(n) is either 0 or an odd number.
12.07.2024 17:29
The answer is when ν2(n) is 0 or odd. Firstly, if ν2(n)=0, then if we let n=2k+1, we have (k+1)+(k+2)+⋯+(3k+1)=(2k+1)2 Now assume ν2(n)>0. Let n=2k for some positive integer k. Any n consecutive integers must be of the form a,a+1,…,a+(2k−1), Now, a+(a+1)+⋯+(a+2k−1)=(2a+2k−1)⋅kNotice that if ν2(n) is even, then ν2(k) is odd, and ν2(2a+2k−1)=0, so ν2((2a+2k−1)k) is odd, and thus (2a+2k−1)⋅k can't be a perfect square. Thus, ν2(n) is odd if ν2(n)>0. It suffices to show that all such n work. Let k=22c⋅r, where r is odd. Now let N2>2k−1 be a sufficiently large odd perfect square. We may choose 2a+2k−1=N2⋅r, since 2a+2k−1 can take any odd number greater than 2k−1. Now, we have (2a+2k−1)⋅k=22c⋅N2⋅r2, which is a perfect square, as desired.