Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132930 views
License: OTHER
Kernel:
%%html <link href="http://mathbook.pugetsound.edu/beta/mathbook-content.css" rel="stylesheet" type="text/css" /> <link href="https://aimath.org/mathbook/mathbook-add-on.css" rel="stylesheet" type="text/css" /> <style>.subtitle {font-size:medium; display:block}</style> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic" rel="stylesheet" type="text/css" /> <link href="https://fonts.googleapis.com/css?family=Inconsolata:400,700&subset=latin,latin-ext" rel="stylesheet" type="text/css" /><!-- Hide this cell. --> <script> var cell = $(".container .cell").eq(0), ia = cell.find(".input_area") if (cell.find(".toggle-button").length == 0) { ia.after( $('<button class="toggle-button">Toggle hidden code</button>').click( function (){ ia.toggle() } ) ) ia.hide() } </script>

Important: to view this notebook properly you will need to execute the cell above, which assumes you have an Internet connection. It should already be selected, or place your cursor anywhere above to select. Then press the "Run" button in the menu bar above (the right-pointing arrowhead), or press Shift-Enter on your keyboard.

ParseError: KaTeX parse error: \newcommand{\lt} attempting to redefine \lt; use \renewcommand

Section2.7Sage Exercises

These exercises are about investigating basic properties of the integers, something we will frequently do when investigating groups. Sage worksheets have extensive capabilities for making new cells with carefully formatted text, include support for LaTeX syntax to express mathematics. So when a question asks for explanation or commentary, make a new cell and communicate clearly with your audience.

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 11 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.1\text{.} Include a verification of your result.

5

Determine a factorization into powers of primes for c=4598037234.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=7d=7 and in a new copy of the cell, testing your code with d=11.d=11\text{.}