College Math Teaching

September 23, 2016

Carmichael Numbers: “not quite” primes…

Filed under: algebra, elementary number theory, number theory, recreational mathematics — collegemathteaching @ 9:49 pm

We had a fun mathematics seminar yesterday.


Andrew Shallue gave a talk about the Carmichael numbers and gave a glimpse into his research. Along the way he mentioned the work of another mathematician…one that I met during my ultramarathon/marathon walking adventures! Talk about a small world..

So, to kick start my brain cells, I’ll say a few words about these.

First of all, prime numbers are very important in encryption schemes and it is a great benefit to be able to find them. However, for very large numbers, it can be difficult to determine whether a number is prime or not.

So one can take short cuts in determining whether a number is *likely* prime or not: one can say “ok, prime numbers have property P and if this number doesn’t have property P, it is not a prime. But if it DOES have property P, we hare X percent sure that it really is a prime.

If this said property is relatively “easy” to implement (via a computer), we might be able to live with the small amount of errors that our test generates.

One such test is to see if this given number satisfies “Fermat’s Little Theorem” which is as follows:

Let a be a positive integer and p be a prime, and suppose a \neq kp , that is a \neq 0 (mod p) Then a^{p-1} = 1 (mod p)

If you forgotten how this works, recall that Z_p is a field if p is a prime, so a \in Z_p, a \neq 0 (mod p) means that the set \{a, 2a, 3a, ...(p-1)a \} consists of \{1, 2, 3, ...(p-1) \} . So take the product (a)(2a)(3a)...((p-1)a)) = 1(2)(3)..(p-1)a^{p-1} = 1(2)(3)...(p-1) (mod p) . Now note that we are working in a field, so we can cancel the (1)(2)...(p-1) factor on both sides to get a^{p-1} = 1 (mod p) .

So one way to check to see if a number q might be a prime is to check all a^{q-1} for all a \leq q and see if a^{q-1} = 1 mod q .
Now this is NOT a perfect check; there are non-prime numbers for which a^{q-1} = 1 mod q for all a \leq q ; these are called the Carmichael numbers. The 3 smallest such numbers are 561, 41041 and 825265.

The talk was about much more than this, but this was interesting.

December 16, 2015

And I deducted points for a “Merry Christmas” math joke

Filed under: pedagogy, recreational mathematics — Tags: , — collegemathteaching @ 11:12 pm

From a student’s final exam in my “Life Contingencies” class (and no, I have no actuarial mathematics training…more on that later)


The student completely ignored the domain considerations for the log function and therefore lost points.

OK, not really. But it makes a better meme to say that.

July 17, 2014

Parabolas have interesting properties

And this is one of them:

July 15, 2014

A quickie from Mathematics Magazine

Filed under: basic algebra, editorial, elementary mathematics, recreational mathematics — Tags: — collegemathteaching @ 9:35 pm

It has been a long time since I’ve posted; I’ve spent time doing various things, including revising a paper that a journal editor wanted revised.

I’ll speak more about that later.

I got the latest Mathematics Magazine in the mail (volume 87, No. 3, June 2014), and the article “Surprises” by Felix Lazebnik is chock full of delightful tidbits, many of which I didn’t know.

Here is a fun one that you can share with your non-mathematically inclined friends (other tidbits there require some mathematics background).

(Surprise 7): A watermelon is 99 percent water (by weight). One ton of watermelons was shipped and during shipment some water evaporated. The watermelons that arrived were made up of 98 percent water (by weight). What was the weight of the shipment when it arrived?

The answer is in the article, but I suggest you give it a go. It will take, at most, a minute or two (if that). This shows the power of basic algebra to discipline our thinking and how our intuition can deceive us.

February 21, 2014

Recreational math problem with a spreadsheet

Filed under: recreational mathematics — Tags: , — collegemathteaching @ 4:37 pm

I saw this on Facebook:


Yes, I know, there are different formulas that work. So suppose we want ” 3 + 5″ to “equal” -28. What we want is the first digests (the constant coefficient upwards) to be the sum of the numbers, and the “leading” digits to be “a-b” with a correct sign; that is: a “+” b = (a-b, a+b) with the comma removed so as to make a single integer (the inputs are integers).

So the “cute” problem: get a spread sheet to do this.


To get full credit: you must get the correct answer for both a greater than b and a “less than” b.

Blog at