# Desmos Activity: Sieve of Eratosthenes

Here’s a digital activity I made for exploring integers and discovering prime numbers.

One of my favorite ideas to use in class is the Sieve of Eratosthenes. Even if you’re not familiar with the name, there’s a chance you’ve come across it before. It’s the algorithm to find the prime numbers which are left after the multiples of earlier prime numbers have been eliminated. (Given the name of this blog, there’s not much surprise I like this topic.)

Prime numbers are not required in the Oklahoma standards for the classes I’m teaching, but I thought the Sieve would make a good start of the year activity. I’ve shared an activity and worksheet based on this, but that was from a more naïve time, when sharing papers and colored highlighters seemed like a good idea.

So I went looking for a digital alternative, and after trying a few different approaches… well, you’ve seen the title of this post. The solution, as it so often is, was Desmos.

This is what I came up with:

https://teacher.desmos.com/activitybuilder/custom/5f3eb1f440d78831973bcd4e

Weirdly enough, this is the first activity I’ve created using the Activity Builder and the Computation Layer in Desmos. But over the last few years, I’ve either been in grad school, or teaching where I didn’t have one-to-one devices.

The activity is very similar to the worksheet I shared above. It steps students through identifying prime numbers, crossing out the composite numbers as they go. But instead of literally crossing out the numbers, students type the list of numbers and Desmos takes care of the crossing. Here’s a partially complete step:

There are some limitations here. I’ve only gone to 100, rather than 150 as I did in the original worksheet, because it’s a lot easier to use a square grid in this case. I preferred 150 originally, because it means crossing out the multiples of 11 makes a difference. (I did consider using something other than 10 by 10, but the grid is already getting a little cramped at this point.) Also, typing in the lists of the multiples gets tedious. Though, I guess that’s no more so than crossing the numbers out by hand. If anyone from Desmos is reading this: would it be possible to allow tables in the Activity Builder to automatically follow a pattern, as they do in the calculator?

This is the final result:

(Note that this image is taken from this graph rather than the activity itself, but I did use the graph to make the activity.)

If you’re looking for a way to discover prime numbers in class which doesn’t involve a paper grid, hopefully you’ll consider giving this a look.