collatz_test
collatz_test,
an Octave code which
calls collatz(), which
computes the Collatz sequence.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the MIT license
Related Data and Programs:
collatz,
an Octave code which
computes and analyzes the Collatz
sequence (or hailstone sequence or 3n+1 sequence);
Source Code:
-
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.
-
mollatz_test.m,
computes the Mollatz 3N-1 sequence for several seeds.
-
nollatz_test.m,
computes the Nollatz N+1 sequence for several seeds.
Last revised on 12 June 2022.