Some Maple examples:

1.  An overview:  Number theory/Maple code/maple_intro[1].mws.mw

2.  Loops, Lists, and Tables (Matrices):  Number theory/Maple code/Maple nested loops.mw

3.  gcd, lcm and linear equations: Number theory/Maple code/Maple gcd and lcm.mw

4.  mod with high powers and another loop example:  Number theory/Maple code/mod with loop.mw