Determine analytically the maximum of a²+b² if a and b belong to the set {1,2...10000} and satisfy |a²-ab-b²|=1.
If a^2-ab-b^2=1, then b=(-a+sqrt(5a^2-4))/2. So 5a^2-4 must be a perfect square. --> a=2, 5, 13, 34, ... --> the sequence a(n)=3a(n-1) - a(n-2) where a(1)=2 and a(2)=5. So the largest a<10001 is a=4181 --> b=2584 --> a^2 +b^2 = 24,157,817. <br>
If a^2-ab-b^2=-1, then b=(-a+sqrt(5a^2+4))/2. --> a=1, 3, 8, 21, ... --> a(n)=3a(n-1) - a(n-2) where a(1)=1 and a(2)=3. So the largest a<10001 is a=6765 --> b=4181 --> a^2 + b^2 = 63,245,986. <br>
So maximum value is 63,245,986.
|
Posted by Dennis
on 2007-02-02 13:36:57 |