问题

数论 >> 一般数论 >> 初等数论
Questions in category: 初等数论 (Elementary Number Theory).

求解不定方程 $13x+19y=1$.

Posted by haifeng on 2022-08-10 21:24:33 last update 2022-08-24 13:09:33 | Answers (0) | 收藏


>> IndefiniteEquation(13,19)
in> IndefiniteEquation(13,19)
Solve the equation: 13*x+19*y = 1
19==1*13+6
13==2*6+1
1 2
test: 9==9*2-3*3


事实上, 19*2-13*3=-1

这里还需测试

test: 9*3-3*2, 结果是 21, 个位数是1, 符合要求.


 

>>  IndefiniteEquation(19,21)
in> IndefiniteEquation(19,21)
Solve the equation: 19*x+21*y = 1
21==1*19+2
19==9*2+1
1 9
test: 9==1*9-9*0


 

in> IndefiniteEquation(13,19)
out> 
Solve the equation: 13*x+19*y = 1
19==1*13+6
13==2*6+1
1 2 
test: -1==9*2-3*3
13*3-19*2 == 1
x = 3+19t
y = -2-13t


-----------end---------