2021年7月11日日曜日

Collatz problem

2 is the only even prime number. Moreover, prime numbers are fractal.

Collatz problem is divided by two parts which are even and odd numbers. When you have odd numbers, you put them in 3n+1. Then you always have even numbers, so you divide them by 2.

You repeat it over and over again, until you get 1.
At first, you have odd numbers (3-29). You put them in 3n+1. You see (10,16,22・・・,88). You divide them by 2 such as (5,8,11・・,44). Half of them are odd numbers which are yellow. The others are even numbers, so you keep dividing them by 2 such as (4,7,10,13,16,19,22). Green numbers are odd which is 50%. This is fractal. You see 1 in the end.


Ex.
●17-52-26-13-40-20-10-5-16-8-4-2-1

●25-76-38-19-58-29-88-44-22-11-34-17-52-26-13-40-20-10-5-16-8-4-2-1

●65-196-98-49-148-74-37-112-56-28-14-7-22-11-34-17-52-26-13-40-20-10-5-16-8-4-2-1

0 件のコメント: