11 Is Not A Typo

Find the number of coprime pairs ( a , b ) (a,b) of positive integers subject to 0 < a < b < 1 0 100 , 0< a<b<10^{100}, such that

a ( b 2 11 ) , b ( a 2 11 ) . a|(b^2-11) , b|(a^2-11).


The answer is 582.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Calvin Lin Staff
Jun 6, 2014

This problem is an example of the Vieta Root Jumping technique. One may want to look at simpler Vieta Root Jumping problems first before jumping (pun intended) into this one.

First, note that for coprime pairs a , b a,b the conditions a ( b 2 11 ) , a|(b^2-11), and b ( a 2 11 ) b|(a^2-11) are equivalent to a single condition: a b ( a 2 + b 2 11 ) . ab|(a^2+b^2-11).

Suppose a 2 + b 2 11 a b = n . \frac{a^2+b^2-11}{ab}=n. This can be rewritten as b 2 n a b + ( a 2 11 ) = 0 b^2-nab+(a^2-11)=0 So b b is one of the roots of the quadratic equation x 2 ( n a ) x + ( a 2 11 ) = 0. x^2-(na)x+(a^2-11)=0. The other root, which is also integer, can be written as c = n a b c=na-b or a 2 11 b \frac{a^2-11}{b} .

If a 2 11 > 0 , a^2-11>0, then a 2 11 , a 2 < a b , a^2-11,a^2<ab, so 0 < c < a 0<c<a . Also, g c d ( c , a ) = g c d ( n a b , a ) = g c d ( a , b ) = 1. gcd(c,a)=gcd(na-b,a)=gcd(a,b)=1. Therefore, the pair ( c , a ) (c,a) also satisfies the same conditions as ( a , b ) , (a,b), for the same n . n.

We apply the above argument repeatedly to any solution ( a , b ) (a,b) until we get a pair ( a 0 , b 0 ) (a_0,b_0) such that a 0 2 11 < 0 a_0^2-11<0 . Note that we can recover the original solution by "jumping back": in the argument above ( a , b ) = ( a , n a c ) . (a,b)=(a,na-c).

If a 0 2 11 < 0 , a_0^2-11<0, we get, since a 0 > 0 , a_0>0, three possibilities: a 0 = 1 , 2 , 3 a_0=1,2,3 .

Case 1. a 0 = 3. a_0=3. Then b 0 2 3 n b 0 2 = 0 , b_0^2-3nb_0-2=0, so b 0 ( b 0 3 n ) = 2. b_0(b_0-3n)=2. This implies b 0 2 , b_0\leq 2, which contradicts a 0 < b 0 . a_0<b_0. So this case is impossible.

Case 2. a 0 = 2. a_0=2. Then, similar to the above, we get b 0 ( b 0 2 n ) = 7. b_0(b_0-2n)=7. Since b 0 > a 0 , b_0 > a_0, this implies that b 0 = 7. b_0=7. So n = 3. n=3. By jumping back this pair ( a 0 , b 0 ) (a_0,b_0) leads to solutions ( u i , u i + 1 ) , (u_i,u_{i+1}), where the sequence { u i } \{u_i\} is given by condition u 0 = 2 , u 1 = 7 ; u i + 1 = 3 u n u n 1 : u_0=2,u_1=7; u_{i+1}=3u_n-u_{n-1}: 2 , 7 , 19 , 50 , 131 , 343 , . . . 2,7,19,50,131,343,...

Case 3. a 0 = 1. a_0=1. Then we get b 0 ( b 0 n ) = 10. b_0(b_0-n)=10. This has three solutions: b 2 , n = 3 , b_2,n=-3, b 0 = 5 , n = 3 , b_0=5,n=3, and b = 10 , n = 9 b=10,n=9 . Note that the first pair, ( a 0 , b 0 ) = ( 1 , 2 ) , (a_0,b_0)=(1,2), cannot be jumped into, because b 2 11 b^2-11 is already negative, so the process would have stopped one step earlier. The other two pairs do lead to infinite series of solutions. The pair ( 1 , 5 ) (1,5) gives a sequence ( v i , v i + 1 ) , (v_i,v_{i+1}), where v 0 = 1 , v 1 = 5 ; v i + 1 = 3 v i v i 1 . v_0=1,v_1=5;v_{i+1}=3v_i-v_{i-1}. The pair ( 1 , 10 ) (1,10) gives a sequence ( w i , w i + 1 ) , (w_i,w_{i+1}), where w 0 = 1 , w 1 = 10 ; w i + 1 = 9 w i w i 1 . w_0=1,w_1=10;w_{i+1}=9w_i-w_{i-1}.

In order to count the number of solutions with b < 1 0 100 b<10^{100} we need to find out how fast these sequences grow. Note that they are similar to the Fibonacci sequences, and grow exponentially. The general theory of linear recursive sequences allows us to find the formulas for them.

Lemma. Suppose s = 3 + 5 2 s=\frac{3+\sqrt{5}}{2} and t = 9 + 77 2 . t=\frac{9+\sqrt{77}}{2}. Then for all i i we have u i = 5 + 4 5 s i + 5 4 5 s i , u_i=\frac{\sqrt{5}+4}{\sqrt{5}}s^i+\frac{\sqrt{5}-4}{\sqrt{5}}s^{-i},

v i = 5 + 7 2 5 s i + 5 7 2 5 s i , v_i=\frac{\sqrt{5}+7}{2\sqrt{5}}s^i+\frac{\sqrt{5}-7}{2\sqrt{5}}s^{-i},

w i = 7 + 11 2 7 t i + 7 11 2 11 t i . w_i=\frac{\sqrt{7}+\sqrt{11}}{2\sqrt{7}}t^i+\frac{\sqrt{7}-\sqrt{11}}{2\sqrt{11}}t^{-i}.

Proof. Note that s s and s 1 s^{-1} are the two roots of the equation x 2 = 3 x 1 , x^2=3x-1, while t t and t 1 t^{-1} are the two roots of x 2 = 9 x 1. x^2=9x-1. The general theory implies that u i = α s i + β s i u_i=\alpha s^i + \beta s^{-i} for some α \alpha and β \beta . Using i = 0 i=0 and i = 1 , i=1, we get α = 5 + 4 5 \alpha=\frac{\sqrt{5}+4}{\sqrt{5}} and β = 5 4 5 \beta=\frac{\sqrt{5}-4}{\sqrt{5}} . The resulting formula is easy to prove by induction. The other two formulas are obtained in the same way.

Now note that s 1 s^{-1} and t 1 t^{-1} are less than 1 , 1, so their powers decay exponentially. So for large i i u i u_i is approximately equal to 5 + 4 5 s i . \frac{\sqrt{5}+4}{\sqrt{5}}s^i. So using logarithms, one can easily check that the largest u i < 1 0 100 u_i<10^{100} is u 238 . u_{238}. Likewise, the largest v i < 1 0 100 v_i<10^{100} is v 238 , v_{238}, and the largest w i < 1 0 100 w_i<10^{100} is w 105 . w_{105}.

So, we have a pair ( 1 , 2 ) , (1,2), 238 238 pairs of type u , u, 239 239 pairs of type v , v, and 105 105 pairs of type w . w. This gives 1 + 238 + 238 + 105 = 582 1+238+238+105=582 pairs.

Similar to one of my problems. Excellent problem/solution! I'm glad I saw root jumping almost immediately. Just one thing though. At first, I factored by difference of squares put my answer as 0 and then realized that was stupid (like, really stupid). I got it after all, and the system marked 582 correct, but in the solutions screen it says:

Correct answer: 582 Your answer: 0

Which isn't right. This is a bug.

Finn Hulse - 7 years ago

Log in to reply

Same with my mine, but mine states 882

Mardokay Mosazghi - 7 years ago

Thanks this is a bug for corrected problems, in which we do not display the correct answer that you typed. We will fix this in future.

Calvin Lin Staff - 7 years ago

You made a computation error when calculating w i w_i . The recurrence is w i + 1 = 9 w i w i 1 w_{i + 1} = 9w_i - w_{i - 1} , so the characteristic polynomial is t 2 9 t + 1 t^2 - 9t + 1 . The roots of this quadratic are t = 9 ± 77 2 . t = \frac{9 \pm \sqrt{77}}{2}.

Also, I get that v 238 6.21 × 1 0 99 v_{238} \approx 6.21 \times 10^{99} and v 239 1.63 × 1 0 100 v_{239} \approx 1.63 \times 10^{100} , so the largest v i < 1 0 100 v_i < 10^{100} is v 238 v_{238} . Can you double-check?

Jon Haussmann - 7 years ago

Log in to reply

Thanks. I missed the discriminant by 1 and used 76 instead of 77. Fixed w i w_i and t t , with no changes to the rest.

You are right about v i v_i . I forgot to account for the coefficient, and hence included an extra solution.

I've updated the answer to 582.

Calvin Lin Staff - 7 years ago

Log in to reply

Agreed that there are 238 238 u u and v v . Ah, I was off by 1 for a different reason: I was counting ( 1 , 1 ) . (1,1). I guess I was lucky to get credit!

Patrick Corn - 7 years ago
Hung Tran
Jun 18, 2014

I write a python program to solve it (execute time: 0.4s)

import math
from fractions import gcd

test = 1
max_num = 10 ** 100

lstb = [1, 2, 5, 10, 7]

a = 2
b = 0
while a < max_num:
    newa = a + 1
    isSet = False
    for tmp in lstb:            
        if tmp <= a:
            continue
        if not isSet:
            newa = tmp
            isSet = True
        if tmp < newa:
            newa = tmp
    a = newa

    a2 = a ** 2

    foundB = False


    for x in lstb :
        if (a2 - 11) % x == 0:
            candidate = (a2 - 11) // x

            b2 = candidate ** 2
            if (b2 - 11) % a == 0:                  
                print(a, candidate)
                lstb.append(candidate)
                b = candidate
                foundB = True
                break

print(len(lstb) - 1)

count = 0
for tmp in lstb:
    if tmp > 1 and tmp < max_num:
        count += 1

print(count)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...