Math 5248 Lec 2 Homework 3 Due Thursday March 7 Five questions, 20 points each. I. Find all square roots of 4 modulo 5•7•11. A direct search which does not use the methods of this course gets no credit. If you find all the roots, you get 20 points; otherwise you get one point per square root (assuming you are using an acceptable method). ANS: First let’s work with 5 and 7. In both cases the two square roots of 4 are ±2. Also we can write 1= 3•5─2•7 = 15─14. Then the four square roots of 4 mod 35 can be found using ±2•15±2•14, which gives 30─28=2 ─28+30=─2 30+28=58=23 ─30─28= ─58= ─23=12 We can check that 122 %35 =144%35=4. Now we work with 35 and 11. It is a little less obvious how to get 35x+11y=1, so let’s use the EA. 35=3•11+2; 11=5•2+1. Then backwards 1 = 11─5•2=11─5•(35─3•11)=16•11─5•35 = 176─175. Then we get eight solutions to x2=4 mod 385 by using the formula a•176─b•175, where a can be ±2 or ±12 and b can be ±2. Here are the eight solutions. Of course, 383≡ ─2, etc. a b 2 -2 12 -12 2 -2 12 -12 x = 176a - 175b mod 385 2 2 2 2 -2 -2 -2 -2 2 68 222 233 317 383 152 163 Check x^2 mod 385 4 4 4 4 4 4 4 4 II. Apply the Fermat test to n =8388607 and m = 8388609. That is, compute 2n-1 mod n and 2m-1 mod m (4pts). You can use the fast exponentiation spreadsheet if you wish. Using this test, what can we say about the primality of these numbers? Be sure to explain your answer. (16 pts) ANS: For n, we get 2n-1 ≡1 mod n, so n might be prime, but we can’t be sure. For m, we get 2m-1 ≡ 4 mod m, and we can say with certainty that m is not prime. 10.5.2. The difference between the two square roots is 203608─43=203565. Now compute gcd(203565,204889): 204889 = 203565+1324 203565=153•1324+993 1324=993+331 993=3*331 So gcd = 331, which is a factor of 294889. Check: 204889=331•619. 13.6.5. We are given n=3585 and b= 434. Then n ─1=3584=29•7. Thus r=9 and m=7. So we compute b0=bm %n=(434)7 %3585=3584, as follows: X 434 434 1936 1936 1771 1771 E 7 6 3 2 1 0 output=Y 1 434 434 1334 1334 3584 But 3584≡─1%3585, so STOP. This b is a witness to the primality of n. (A false witness, as it turns out.) 18.1.2 x y 2 6 38 133 622 y-x 2 38 622 714 583 gcd(y-x,n) 0 32 584 581 -39 So 13 is a factor of 1313; indeed 1313=13*101. 1 1 1 13