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.
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.