Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168732
Image: ubuntu2004
# 17 x = 10 mod 50 # xgcd function from exercise 1.14 xgcd(17,50)
(1, 3, -1)
# 3 is the modular inverse of 17 mod 50 Mod(3*17,50)
1
x=Mod(3*10,50); x
30
xgcd(35,50)
(5, 3, -2)
# 35 is not invertible mod 50 # but 5=gcd(35,50) divides 10 # Thus the equation is transformed into 7 x = 2 mod 10 xgcd(7,10)
(1, 3, -2)
# 3 is the modular inverse of 7 mod 10 Mod(3*7,10)
1
x=Mod(3*2,10);x
6
# 35 is not invertible mod 50 # but 5=gcd(35,50) does not divide 11 # There is no solution to 35 x = 11 mod 50