How to Use
Enter a and b:
- Coprime: Is gcd(a,b)=1?
- Bézout: Find x,y with ax+by=gcd
- Count: Coprimes up to n
Bézout's Identity
For any a,b: ∃x,y ∈ Z with ax+by=gcd(a,b). Found by extended Euclidean algorithm. When gcd=1: ax+by=1, so x=a⁻¹ (mod b). This is the basis of modular arithmetic.
Coprimality Probability
P(gcd(a,b)=1) = 6/π² = 1/ζ(2) ≈ 0.6079. For k numbers: P(gcd=1) = 1/ζ(k). This connects number theory to the Riemann zeta function.
Step-by-Step Instructions
- 1Enter a.
- 2Enter b.
- 3Check coprime.
- 4View Bézout.
- 5Count coprimes.