- or download this
#!/usr/bin/env perl
use strict;
...
printf "Collatz(%5d) has sequence length of %3d steps\n", @$_
for @seqs;
- or download this
#!/usr/bin/env perl
use strict;
...
printf "Collatz(%5d) has sequence length of %3d steps\n", @$_
for @seqs;
- or download this
$ time perl collatz3_a.pl 1e7
...
Collatz(8397953) has sequence length of 593 steps
Collatz(6298465) has sequence length of 590 steps