Skip to content

iterating through the first 100 numbers and printing out the steps and amount of steps it took for each to reach the number 1

Notifications You must be signed in to change notification settings

wferebee/Python-3xplus1-Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Running through the first 10,000 numbers of the 3x + 1 Algebra

If the number is odd, then multiply by (3x+1). If the number is even, then divide by 2. Stop when the number reaches 1

  • when a number reaches 1, it enters an infinite loop of "1 -> 4 -> 2 -> 1 -> 4..."

Scientist have worked out that atleast the very first 2^68 digits all resolve to the number loop of "-> 4 -> 2 -> 1 -> 4...", but it has not been proven yet if this exists for all numbers

Here, I am just running through the first 10,000 digits as an exercise while learning Python

  • execution time < .5 seconds
  • after trying the first, 100, 500, 1000, so some values may have been stored already

About

iterating through the first 100 numbers and printing out the steps and amount of steps it took for each to reach the number 1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages