πββοΈHello innovators, A interesting Mathematical conjecture in Maths called 3x+1 map or Collatz conjecture or Hassie's algorithm, which is simple to understand :- π§
- Take a any natural number.(let x)
- If the number is even then divide it by 2.( x -> x/2) OR else if the number odd then multiply it by 3 and add 1 ( x -> 3x+1)
- Repeat these steps for every answer you get and you'll find that for any value of x you'll end up to 1 and loop of(4,2,1).
π€© I simply programmed it. so that you can get a π graph as illustrator which shows value after each iteration (Y-axis) and number of iterations(X-axis). just enter your desired input and see the magic.
you'll observed that for any value of input it end up with 1.
Tools used :-π§βπ»
- (library) chart.js
- (logic) Javascript