Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 841 Bytes

README.md

File metadata and controls

21 lines (13 loc) · 841 Bytes

Orderly Cubes

Info

orderlycubes.rb demonstrates a base-10 repeating number pattern where adding the cubes of certain numbers appears to simply concatenate the original bases, as visualized in this tweet.

Dependencies

  • Ruby, obviously.
  • There is one recommended gem dependency, colorize. The script will either detect it and use it or not detect it and not use it.

Usage

  • > ruby orderlycubes.rb

Or, on a Unix-like shell:

  • > chmod +x orderlycubes.rb; ./orderlycubes.rb

The script accepts one optional argument, which must consist only of numerical digits, and sets the number of iterations to calculate (default: 33).

  • > ruby orderlycubes.rb 3