Eksempler
The sample from the page
Du får
- Invers
- 5
- Største felles divisor
- 1
- Kontroll
- 3 × 5 ≡ 1 (mod 7)
- Bezout
- -2 × 3 + 1 × 7 = 1
- Trinn
- 2
3 times 5 is 15, and 15 leaves remainder 1 when divided by 7. The Bezout line is a second proof: -6 plus 7 equals 1.
Kjørt med verktøyets egen kode.
A larger pair
Du får
- Invers
- 2753
- Største felles divisor
- 1
17 times 2753 is 46801, which is 15 times 3120 plus 1. This pair is a common textbook case, and the tool finds the answer by the extended Euclidean method.
Kjørt med verktøyets egen kode.
A negative number
Du får
- a mod m
- 5
- Invers
- 2
- Største felles divisor
- 1
The tool first turns -4 into the residue 5 (mod 9). Then 5 times 2 is 10, which leaves remainder 1, so the inverse is 2.
Kjørt med verktøyets egen kode.
No inverse exists
Du får
- Status
- No inverse exists for these values
- Største felles divisor
- 3
- Melding
- No inverse exists because the gcd is not 1.
6 and 9 share the factor 3. Any multiple of 6 and any multiple of 9 are both multiples of 3, so a product of 6 with a whole number can never sit exactly 1 above a multiple of 9.
Kjørt med verktøyets egen kode.