Collatz Sequence in Python: Iterative VS Recursive

preview_player
Показать описание
In this video we implement different algorithms for calculating the length of the Collatz sequence for a given number.

◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚

💼 Services 💼

🌐 Social Media & Contact 🌐
Рекомендации по теме
Комментарии
Автор

I solved Collatz Sequence in 2 ways. Both ways are at Cambridge Open Engage. Egyptian math professor and board member at APM approved my solution in 2nd way (1.5 pages). It will be at math magazine soon. Taha M. Muhammad/ USA Kurd Iraq.

tahamuhammad
Автор

In my ignorance I'd never heard of the Collatz Sequence - but I'm glad I have now thanks to this video. I love this sort of stuff, and the elegant programming solutions that can be applied to solve it. Thanks for this and all the others!

skf
Автор

I did this in C++ some years ago, making a frequency graph. It was quite a fun and small project, yet still remains my favorite unsolved math problem!

veroverobrian
Автор

Another example of a trivial seemingly not turing solvable system. Liked it.

HelmutQ
Автор

The number should not be negative otherwise it will give infinite list.
For example, if n == -1 or n == -2 then the iteration will be infinite : -1, -2, -1, -2, ...
Another example, where n == -3 then it will result: -3, -8, -4, -2, -1, -2, -1, ...
And it should not be zero also, because when you divide zero over 2 it will remain the same zero, so it is infinite.

menaa
Автор

Not just that, but also in a documentary movie in Goerge Washington University Press. This movie will be available in worldwide competition under my name Mr. Grandpa Taha M. Muhammad/ USA Kurd of Iraq.
Collatz, Euler Fermat's both Last Theorems!
Movie Maker: Aaron Dye/USA DC.

tahamuhammad
Автор

can you help me predict the next series of numbers if i give you the previous 30 numbers by using python and ML? please

learnenglishcomputer
Автор

How to create a Journal day trading with Phyton?? It´s possible to import the trades data and intregrate with the yfinance for create a charts with the buys and sells?

Tajallo
Автор

How i buld ai or script to play greedy or lucky wheel 🎡 by using python .. what I mean is .. i want this script guess what is number is win before win .. depends the 30 or 40 last output ... Is any idea give me to do this ?

learnenglishcomputer
Автор

holy sh**! it's even 1 second faster than the fastest horse Rust with LRU on

oliverli