Divisibility

Preliminaries: Basic definitions

IntegerQ[456456456/123123123]

PrimeQ[123123123]

Mod[10, 7]

r[a_, b_] := Mod[a, b]
q[a_, b_] := (a - r[a, b])/b
a = 20; b = 7;
{q[a, b], r[a, b]}

Greatest common divisor

\(\(\(GCD[73963, 81959]\)\(
\)
    \)\)

The Euclidean algorithm

ourgcd[a_,  0]  :=  Print[a]
ourgcd[a_,  b_]  :=  (ourgcd[b,  r[a,  b]];  
        Print[ {a, b, r[a,  b]}])

ourgcd[227, 143]