Share your repls and programming experiences

← Back to all posts
3n + 1!
epicman702

Now, if you know maths, you might know this infamous problem.

Just in case you don't here are the rules.
Choose a number. Any number
If it's odd, times it by 3 and add 1
If it's even, divide by 2.
Repeat.

The theory is, any number you chose, it will always get stuck in a 4, 2, 1 loop

It's a really simple code, but a really complex puzzle

Warning: May glitch your computer

Voters
MattDESTROYER
a-repl-user
JWZ6
DillonB07
epicman702
Comments
hotnewtop
DillonB07

The proper name for this is "Hailstone Numbers"!

They're really cool!

epicman702

@DillonB07 They are really darn cool
And really simple to code as well

VulcanWM

Nice also

chose

epicman702

@VulcanWM Right