Skip to content

gderosa/x3p1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

x3p1

See https://www.youtube.com/watch?v=094y1Z2wpJg.

This is about sequences having just these rules:

  • if value y is even, then divide it by 2
  • if it's odd, then turn it into `3*y + 1
  • extra rule: if y is equal to 1, interrupt the sequence (it would otherwise get into a 4-2-1 endless loop),

and keeping track of the "tallest" and "widest" sequence obtained so far (progressively increasing the initial value).

Plot images of such sequences go into plots/*/. For example:

000000156159

Requirements

Usage

python x3p1.py

Stopping and resuming (caching)

You can stop execution with CTRL+C. You can resume later, and computation will start from where you left. If you want to start everything over, delete the file .cache.json.

A video was made out of plot pictures

See https://www.youtube.com/watch?v=TzE3z4Burdk.

Video was made with

ffmpeg -framerate 2 -pattern_type glob -i 'plots/jpg/*.jpg' out.mp4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages