Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,16 @@
#!/usr/bin/tclsh8.6
package require Tcl 8.6 ;# For [lsort -stride] option
lappend auto_path . ;# Or wherever it is located
package require hailstone 1.0
# Construct a histogram of length frequencies
set histogram {}
for {set n 1} {$n < 100000} {incr n} {
dict incr histogram [llength [hailstone $n]]
}
# Identify the most common length by sorting...
set sortedHist [lsort -decreasing -stride 2 -index 1 $histogram]
lassign $sortedHist mostCommonLength freq
puts "most common length is $mostCommonLength, with frequency $freq"