wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> easy >> Cheerleaders in Formation
(Message started by: FiBsTeR on Mar 14th, 2009, 7:10pm)

Title: Cheerleaders in Formation
Post by FiBsTeR on Mar 14th, 2009, 7:10pm
A cool problem, I'm sure there's a few ways to do it:

=====

A group of cheerleaders wish to arrange themselves on a field. They attempt to line up in a square such as

. . .
. . .
. . .  (etc)

but find that five cheerleaders would be left over. They then line up in a rectangle with seven more columns than rows with none left over. What is the greatest number of cheerleaders that could be in the squad?

Title: Re: Cheerleaders in Formation
Post by ronnodas on Mar 14th, 2009, 9:52pm
I'm getting only one solution: [hide]294[/hide]

Title: Re: Cheerleaders in Formation
Post by Grimbal on Mar 15th, 2009, 2:18am
There would be another value matching the conditions:  [hide] 30 = 25+5 = 3*10 [/hide]

We want to solve
n(n+7) = k2 + 5
2n(2n+14) = (2k)2 + 20
(2n+7)2 - 49 = (2k)2 + 20
(2n+7)2 - (2k)2 = 69
(2n+7+2k)(2n+7-2k) = 69 = 3*23
There are only 4 possible products:
(2(n+k)+7, 2(n-k)+7) = (1, 69), (3, 23), (23, 3) or (69, 1)
(n+k, n-k) = (-3, 31), (-2, 8), (8, -2) or (31, -3)
(n, k) = (14,-17), (3, -5), (3, 5) or (14, 17)
but n,k>0
(n, k) = (3, 5) or (14, 17)

It shows no larger solution exists.

PS: actually there are more products -1*-69, -3*-23, etc.  but these all result in n<0.

Title: Re: Cheerleaders in Formation
Post by FiBsTeR on Mar 15th, 2009, 7:55pm
Cool! Here's my solution, though it doesn't allow you to find all possible numbers of cheerleaders very easily (I don't think):

We want the maximal k so that:

n(n+7)=k2+5
n2+7n-(k2+5)=0
By the quadratic formula:

n=(1/2)(-7+\sqrt{(2k)2+69})

We took the positive root because there are a positive number of cheerleaders. Now the last time the discriminant is a perfect square is when adding 69 to a perfect square yields the next perfect square. (After this point, the "spacing" becomes too big. You know what I mean.) So:

(2k)2+69=(2k+1)2
4k2+69=4k2+4k+1
4k=68
k=17

--> 172+5=294.



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