tag:blogger.com,1999:blog-6949071374236376494.post5023922539843283532..comments2017-04-18T04:11:38.690-07:00Comments on Adventures of a Wannabe Programmer: Collatz Sequence: Euler 14 Problem Walkthrough in Pythonnewb_girlhttp://www.blogger.com/profile/11799250193629201408noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-6949071374236376494.post-47971408450614004552015-06-12T00:29:04.963-07:002015-06-12T00:29:04.963-07:003*n+1 where n is odd is always going to have an ev...3*n+1 where n is odd is always going to have an even result, so you can do this:<br />return 2 + recursive_method((3*n + 1) / 2)<br />it doesn't change the general scaling of the performance but it does provide a non trivial boostTolomeahttp://www.blogger.com/profile/16384928311920896699noreply@blogger.com