Skip to main content
\(\newcommand{\identity}{\mathrm{id}} \newcommand{\notdivide}{{\not{\mid}}} \newcommand{\notsubset}{\not\subset} \newcommand{\lcm}{\operatorname{lcm}} \newcommand{\gf}{\operatorname{GF}} \newcommand{\inn}{\operatorname{Inn}} \newcommand{\aut}{\operatorname{Aut}} \newcommand{\Hom}{\operatorname{Hom}} \newcommand{\cis}{\operatorname{cis}} \newcommand{\chr}{\operatorname{char}} \newcommand{\Null}{\operatorname{Null}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section2.7Sage Exercises

These exercises are about investigating basic properties of the integers, something we will frequently do when investigating groups. Use the editing capabilities of a Sage worksheet to annotate and explain your work.

1

Use the next_prime() command to construct two different 8-digit prime numbers and save them in variables named a and b.

2

Use the .is_prime() method to verify that your primes a and b are really prime.

3

Verify that \(1\) is the greatest common divisor of your two primes from the previous exercises.

4

Find two integers that make a “linear combination” of your two primes equal to \(1\text{.}\) Include a verification of your result.

5

Determine a factorization into powers of primes for \(c=4\,598\,037\,234\text{.}\)

6

Write a compute cell that defines the same value of c again, and then defines a candidate divisor of c named d. The third line of the cell should return True if and only if d is a divisor of c. Illustrate the use of your cell by testing your code with \(d=7\) and in a new copy of the cell, testing your code with \(d=11\text{.}\)