An optimized solution for the modified collatz conjecture problem here - https://projecteuler.net/problem=277