Collatz Conjecture

Namyong Lee, Minnesota State University-Mankato, Mathematics & Statistics

Author Profile
Initial Publication Date: October 7, 2025

Summary

One of the essences in mathematics is finding patterns. This lab project allows students to explore mathematical conjecture through computer coding (mainly by the generative AI) and experimentation (by students). Here, we use the Collatz Conjecture, but one can do a similar activity to any other conjecture, such as the Goldbach Conjecture. A group (2 or 3 students per group) project is highly recommended.

Share your modifications and improvements to this activity through the Community Contribution Tool »

Learning Goals

What concepts and content should students learn from this activity?
- Understand and experience mathematical patterns through computer experiments.

How is MATLAB utilized in this activity, and how does this improve student learning?
- MATLAB is used for computer experiments (performing tests for a large number of cases) to test a conjecture.

Are there higher-order thinking skills (e.g., critical thinking, computation, data analysis, synthesis of ideas, model development) that are developed by this activity?
- Finding patterns, conjecturing certain rules, and verifying them are typical activities in mathematics. This lab is intended for a more experimental level (analytic level requires more background and skills) of those activities, so that any grade level can start with.

Are there other skills (writing, oral presentation, field techniques, equipment operation, etc.) that are developed by the activity?
- We used this project as a group project. As a result, students had the opportunity to compare their results, discuss their findings, and cross-check each other. Naturally, they developed how to reject a certain wild guess (a wrong conjecture) — by finding a counterexample!

Context for Use

The educational level, class size, institution type, etc.
- We used this activity for a class with mainly the first-year students at Minnesota State University. My class size was 18 students.

Is it a lab, a classroom activity, or a longer project? How much time is needed?
-It is intended for a 75-minute computer lab. However, one can easily expand it to use a week-long project, or an undergraduate research project for a semester.

What are the technical skills and experience with MATLAB the students need to complete this activity?
- Students only need a readability of the Matlab code. (They no longer do coding by themselves, at least for the basic level, due to the generative AI, such as ChatGPT, Gemini, and Copilot.)

Are there other disciplinary skills or concepts that students should have already mastered before encountering this activity?
- Basic logic skills. It is designed to develop a pattern-finding from computer experiments.

How is this activity situated in the course? How easy (or hard) would it be to adapt the activity for use in other settings?
- It is one of the core parts of the course. As it is an open project without a definitive answer, the instructor can adjust the difficulty level.

Describe the technical skills and experience with MATLAB that the students must have mastered before the beginning of the activity:
- Students should be exposed to basic MATLAB syntax and the ability to read a simple MATLAB code. It is not necessary for students' coding skills. However, we found that basic debugging skills would be a big plus for the project. This lab can be done in other popular programming languages, such as Python.

Description and Teaching Materials

The Collatz conjecture is a well-known problem that can be found in numerous resources on the internet. (Hint: The Collatz Conjecture on Google). I have posted my lab (Group Work) file on this site. Please feel free to add/subtract questions. I added some resources (references) in the Resources field at the bottom of this form.

  • Collatz.m (Matlab File 1018bytes Feb2 26) is a sample Matlab code.
  • is for instructors only (to give an idea of possible outcomes).
  • Experimental_Math (Acrobat (PDF) 32kB Feb2 26) is a class activity handout for students.

These files are an idea (or example) of experimental mathematics, and each instructor can modify the activities to fit their class environment.

Teaching Notes and Tips

We highly recommend the lab as a group activity, as students have the opportunity to share their ideas and compare the results with others. It seems that coding itself has less value for assessment (due to the availability of generative AI tools).


Assessment

This is an open conjecture (no one has proved or disproved it yet!), and hence there is no definitive answer for the project. It is intended that students explore and discuss how to discover/generate interesting patterns through a computer lab experiment.

Depending on the available time, you may assess in several different ways:
1. If one likes to close in one single lab, ask each group to present their experiments and findings orally. Some groups may like to show certain patterns in picture form.

2. If you can bring it to a week-long or longer project, you may ask for a short technical report of their findings/ experience in a certain guided format.

References and Resources

Here are some references for Experimental Mathematics:

1. The Computer as Crucible: An Introduction to Experimental Mathematics, by J. Borwein and K. Devlin, 2008, AK Peters

2. Experimental Mathematics in Action, D. Bailey, 2007, AK Peters

3. Experimental Mathematics: A Computational Perspective, M. Richey and M. Wright, 2025, AMS