Collatz Conjecture (3n+1) in Python: Coding on Ice Ep.2

preview_player
Показать описание
I'm at the polar bear club in Joensuu, Finland coding after an ice swimming session :-) Can I implement the collatz conjecture (3n+1) before I need to use the Sauna? Stay tuned to find out!
Рекомендации по теме
Комментарии
Автор

This is a very fun series, keep doing it! I really enjoy these short lessons that can introduce u to new concepts.

alexrabochii
Автор

You say that, as soon as the program is hanging, you have disproved the Collatz conjecture. Unfortunately this is not true. It can also mean that it takes a very long time for the number to return to 1. And this happens. In fact, no computer in the world can prove or disprove the Collatz conjecture (EDIT: nope, see the answers). This can only be decided by mathematics. In the worst case, the conjecture may turn out to be undecidable (like the Continuum Hypothesis), which means that it can neither be proven nor be disproven - we simply don't know yet.

ScriptRaccoon
Автор

👏👏👏🔝🔝 Thank you. Very creative and instructive.

walkexperience