# Collatz is the name of the conjecture

I found it: Collatz Conjecture (found with query "3x+1 conjecture")
I am having a tip-of-the-tongue moment. I tried a web search, but I couldn't find what I was looking for. It goes kind of like this:

if x is even, x /= 2;
else x = 3*x + 1;
//We always get to 1 (or some other number)


I remember seeing that (or something like that, with the same outcome, i.e. x eventually tends to one) but I'd have to find it in my Python book.

def algwic(n):                #alg for algorithm, wic for what's it called
while n > 1:
print(n)
if n % 2 == 0:        #n%2==0 is true if n is even
n //= 2           #n//=2 floor div augmented assignment
else:                 #so you don't get things like 18.0
n = 3*n+1
print(n)


This? (Python code)

3n+1! That's a part of it that I forgot!
And a search for it (with the word "conjecture") led me to the answer!

I made a plotting thing for it.