10 minutes

# Social

Meet more students

# First exploration wrap-up: Pythagorean triples

Goal was: Find lots of primitive triples and make a picture of them. See if there are patterns!

## Rigorous square-testing

sqrt gives a "floating point" result, and is approximate

Better to generate a list (or even better, a set) of square integers and test candidates against that list.

## New Python language feature list comprehensions

A concise way of setting up lists

Example: the square integers

## Odds and evens

In the a and b of any Primitive Pythagorean triple, one must be even and one odd (prove).

Suggestion for clearer picture: put all evens on one axis and odds on the other. How to test for even?

# Second exploration: prime numbers

Brute force algorithm

Sieve of Eratothenes: eliminate all integer multiples of each integer.

Primes seem somewhat random. Is their density increasing/decreasing?

# Third exploration: "crime" numbers

Def: A positive integer n > 1 is a "crime" number if b**n = b (mod n) for all integers b, 1 < b < n.

Try 4, 5.

A few more trials

Is the definition of "crime" numbers somehow equivalent to the definition of prime numbers?