collatz_test
collatz_test,
a MATLAB program which
calls collatz() to compute the Collatz sequence.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Related Data and Programs:
collatz,
a MATLAB library which
computes and analyzes the Collatz
sequence (or hailstone sequence or 3n+1 sequence);
Source Code:
-
collatz_test.m,
calls all the tests.
-
collatz_test.sh,
runs all the tests.
-
collatz_test.txt,
the output from the tests.
-
collatz_test01.m,
computes the Collatz sequence for several seeds.
-
collatz_test02.m,
computes the length of the Collatz sequence for seeds 1 to 100.
-
collatz_test03.m,
writes the Collatz sequence for seed 27 to a file, and the
Collatz sequence lengths for seeds 1 to 100 to a file.
-
collatz_27.txt,
the points in the Collatz sequence for seed 27.
-
collatz_count.txt,
the Collatz count for seeds 1 to 100.
-
collatz_test04.m,
displays the Collatz sequence for seed 27.
-
collatz_sequence_27.png,
a plot of the Collatz sequence for seed 27.
-
collatz_test05.m,
displays the Collatz max for seeds 1 to 1000.
-
collatz_max.png,
a plot of the Collatz max values for seeds 1 to 1000.
-
collatz_test06.m,
displays the Collatz count for seeds 1 to 50.
-
collatz_count.png,
a plot of the Collatz coount values for seeds 1 to 50.
Last revised on 14 December 2018.