##### The Collatz Conjecture

I made this after learning about it from one of my favorite English YouTubers.

The Collatz Conjecture is a fairly simple idea. You start with any positive integer, and go from there. If the integer is even, you divide it by two, and if it is odd, you multiply it by three and add one. You keep iterating it over and over like this, and it levels out. I've made it print out the average, highest, and lowest values at the end

Please Enjoy! Any feedback would be greatly appreciated.

(´,,•ω•,,)♡

PS good morning -.-

The conjecture is actually that it will eventually reach 1 after enough iterations. However, great job! Maybe, next you could try to prove the conjecture (at least experimentally using a program to test every number possible since nobody has actually proven it mathematically before and it is an open problem in mathematics)!

@AmazingMech2418 Oh, so I should do something mathematical that no one has yet to do?! Sounds easy!wwwwwwww

@LizFoster Well, at least an experimental "proof". Really just testing as many numbers as possible.

@AmazingMech2418 Actually, I can think of a method already!!!

@LizFoster To prove the Collatz Conjecture?

@LizFoster Maybe next you should try the Riemann Hypothesis. LOL! (though, actually, you could) How would you prove the Collatz Conjecture which nobody has proven for decades?

@AmazingMech2418 It's difficult to explain very well.. You go through each integer value, and as long as the user still wants to keep going, it keeps testing the next highest integer, and then says how many iterations it took to get to 1. for 1 it is 0, for 2 it is 1, etcetera.

@LizFoster That should work as an experimental proof.

@AmazingMech2418 Yay! I was honestly a little bit worried you'd think it was dumb..

@LizFoster Nope! That's pretty much what I was thinking too. However, at first, I did think you were talking about a mathematical proof...

@AmazingMech2418 No, that would be incredible. Are you referring to a formula that would find the number of required iterations?

@LizFoster No. I mean a proof that all numbers will reach 1 eventually.

@AmazingMech2418 Ah, okay. I'm trying to think of a way that you could do so, but I must say, it's certainly proving to be difficult!wwwwwwww

Sorry to get your hopes up..

@LizFoster This is a graph of numbers in the Collatz Conjecture (scroll to the right to see more once on the website): https://collatzgraph.amazingmech2418.repl.co/ Notice that there are more flat lines towards the right of it. That means that more numbers have the same values there. For some reason, I'm thinking it might have something to do with the Riemann Zeta Function, but I'm not exactly sure why...

@LizFoster The graph might be down. I'm just running a few more iterations to get more numbers in the graph.

@LizFoster It should be back up now.

@LizFoster Each vertical line represents a number inputted into the Collatz Conjecture with a height of the number of iterations.

@LizFoster This is what I got if you don't want to actually go to the website.

You have to open it in a new tab since it is very wide. Or just go to this link: https://storage.googleapis.com/replit/images/1586883989290_d299f19f84ff2ff6ec299132a6d09833.png (and zoom in of course)

@LizFoster If you try to open the website and it is down, please let me know. I'm not sure how the prompt for starting the server or continuing with more iterations will work if it has to wake up the repl. It being down means that you don't see anything on the screen.

@AmazingMech2418 No, it is fine. My devices are just suddenly lagging quite a bit for some reason..

Interesting. Yeah, it's possible that it does have something to do with that, but I'd be interested to see how one would convert it over..

@AmazingMech2418 *that being the Riemann Zeta Function

@LizFoster Do you have any other ideas about why the graph may have the shape it has?

@AmazingMech2418 None. It looks suspiciously like a logarithm though, so I'll see if I can find any ties!

@LizFoster Yeah. I thought Riemann Zeta because of the similarities later on between different values. However, it might be a mixture between the two, logarithms for the basic shape and zeta for the variation.

@AmazingMech2418 Hmmm.. This is so exciting!

@LizFoster Yeah, it is! Who knows? Maybe we could solve the Collatz Conjecture!

@AmazingMech2418 That would be absolutely incredible! We should take this somewhere easier to communicate. Multiplayer repl, or Google Hangout maybe?

@AmazingMech2418 I don't want anyone stealing this wwwwwwww

@LizFoster Probably a multiplayer repl would be easiest.

@LizFoster Should I start the repl or should you?

@AmazingMech2418 Yeah, you're right. I'll invite you to one

Keep in mind that the higher the value you enter for the second one, the longer it'll take to finish, so please do something reasonable if time is of the essence.

ive never heard of this before

but it sounds like it can be fractally if mapped to x,y plane

i get some funky stuff when i tried it

https://repl.it/@mwilki7/collatz-canvas

@mwilki7 Oh, wow~! That looks very pretty! Good work!