Skip to content

oxy86/collatz-conjecture

Repository files navigation

This is a simple Next.js project to demonstrate/visualize the Collatz Conjecture (3N+1).

Also known as the Ulam Conjecture, Kakutani's Problem, Syracuse Problem or simply 3N+1, the Collatz Conjecture is the following:

  • Take any positive integer number.
  • If the number is odd, multiply it by three and add one. If the number is even, divide by two. Repeat with every new number.

The conjecture →

Every positive integer, if you apply these rules, will end up in a four → two → one loop.

It is called Collatz Conjecture after German mathematician Luther Collatz.

The app uses tailwindcss for CSS and Recharts for charts and visualizaiton.

Getting Started

First, download the code, enter the new folder and install the node packages:

npm install

Then run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the app running.

Changelog:

2024/12/10 - Push to Vercel 2025/01/23 - NextJS 15

About

Demonstration of Collatz Conjecture (3N+1) in React/Next.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published