wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> easy >> sum of consecutive integers
(Message started by: Christine on Jul 14th, 2015, 1:04pm)

Title: sum of consecutive integers
Post by Christine on Jul 14th, 2015, 1:04pm
Can you find four consecutive numbers whose sum is a perfect square?


Title: Re: sum of consecutive integers
Post by rloginunix on Jul 14th, 2015, 1:39pm
[hide]No[/hide].

Title: Re: sum of consecutive integers
Post by rloginunix on Jul 14th, 2015, 5:56pm
Further. We generalize this quickly into a beautiful theorem:

When may the sum of N consecutive integers be represented as a perfect square?


If my arithmetic holds then [hide]the sum does not exist if the non-zero power of 2 of the prime factorization of N is even and, conversely, the sum does exist if the power of 2 of the prime factorization of N is either odd or zero[/hide]. The choices recipes to follow.

(The night is falling on the East Coast, I will post my proof tomorrow, hopefully)

Title: Re: sum of consecutive integers
Post by towr on Jul 14th, 2015, 10:31pm
For 4, [hide]the sum of 4 consecutive integers is always 4x+6, where x is the first number. Squares are always 0 or 1 modulo 4, but 4x+6 is 2 modulo 4, so it's never square.[/hide]

Title: Re: sum of consecutive integers
Post by rloginunix on Jul 15th, 2015, 9:47am
For N: let x be the first term, (x + N - 1) - the last. We wish that the [hide]sum of N such terms be a perfect square:

N(x + x + N - 1)/2 = N(2x + N - 1)/2 = s2

Solve for x:

x = s2/N + 1/2 - N/2     (1)

N is either 1) odd or 2) even.

1). N = 2q + 1. From (1) it follows that its last two terns add up to be whole and even. For x then to be whole (1)'s first term must be whole - choose s = N and put it into (1):

x = (N + 1)/2 = (2q + 2)/2 = q + 1

Example: q = 1, N = 3, x = 2, sum = 2 + 3 + 4 = 9 = 32

2). N = 2q. Put it into (1):

x = s2/(2q) + 1/2 - q     (2)

From the prime factorization theorem it follows that any integer, q including, may be represented as 2k*d where d is odd and k is positive or zero. For k then we have two choices - odd or even.

2.1). Let k = 2z. Then q = 22z*d. From (2) it follows then that for x to be whole s2/q must be odd (why?). The choice for s then is obvious: s = 2z*d. Put it back into (2):

x = d/2 + 1/2 - 22z*d

It means that it works and N has an odd number of 2s in its factorization.

Example: d = 3, z = 1, q = 12, N = 24 = 23*3, x = -10, sum = -10 + ... + 13 = 36 = 62

2.1). Let k = 2z - 1. Then no matter how many 2s s has s2/q is never odd and whole (what is it?):

s = 2r*t

s2/q = 22r - 2z + 1*t/d

for whole r and z the power of 2 above is never zero (why?).

qed[/hide]



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board