An open API service indexing awesome lists of open source software.

https://github.com/oxy86/collatz-conjecture

Demonstration of Collatz Conjecture (3N+1) in React/Next.js
https://github.com/oxy86/collatz-conjecture

collatz-conjecture mathematics nextjs react tailwindcss

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

          

This is a simple [Next.js](https://nextjs.org/) 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:

```bash
npm install
```

Then run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the app running.

Changelog:

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