16-Jun-2022 17:53:33 collatz_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2. Test collatz(). collatz_inverse_test(): collatz_inverse() computes the inverse image of a set of numbers under the Collatz transformation. Step = 0 1 10 16 Step = 1 2 3 5 20 32 Step = 2 4 6 10 40 64 Step = 3 3 8 12 13 20 21 80 128 Step = 4 6 16 24 26 40 42 160 256 Step = 5 5 12 13 32 48 52 53 80 84 85 320 512 collatz_level_test(): collatz_level(k) computes all the values which are k steps away from 1. Level = 0, Size = 1 1 Level = 1, Size = 1 2 Level = 2, Size = 1 4 Level = 3, Size = 1 8 Level = 4, Size = 1 16 Level = 5, Size = 2 5 32 Level = 6, Size = 2 10 64 Level = 7, Size = 4 3 20 21 128 Level = 8, Size = 4 6 40 42 256 Level = 9, Size = 6 12 13 80 84 85 512 Level = 10, Size = 6 24 26 160 168 170 1024 Level = 11, Size = 8 Columns 1 through 6 48 52 53 320 336 340 Columns 7 through 8 341 2048 Level = 12, Size = 10 Columns 1 through 6 17 96 104 106 113 640 Columns 7 through 10 672 680 682 4096 collatz_test01(): collatz() computes the Collatz sequence for a given key. key: 5 Sequence length: 6 5 16 8 4 2 1 key: 6 Sequence length: 9 6 3 10 5 16 8 4 2 1 key: 19 Sequence length: 21 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1 key: 27 Sequence length: 112 27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1 key: 95 Sequence length: 106 95 286 143 430 215 646 323 970 485 1456 728 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1 collatz_test02(): collatz_count() computes the length of the Collatz sequence for a given key. 1 1 2 2 3 8 4 3 5 6 6 9 7 17 8 4 9 20 10 7 11 15 12 10 13 10 14 18 15 18 16 5 17 13 18 21 19 21 20 8 21 8 22 16 23 16 24 11 25 24 26 11 27 112 28 19 29 19 30 19 31 107 32 6 33 27 34 14 35 14 36 22 37 22 38 22 39 35 40 9 41 110 42 9 43 30 44 17 45 17 46 17 47 105 48 12 49 25 50 25 51 25 52 12 53 12 54 113 55 113 56 20 57 33 58 20 59 33 60 20 61 20 62 108 63 108 64 7 65 28 66 28 67 28 68 15 69 15 70 15 71 103 72 23 73 116 74 23 75 15 76 23 77 23 78 36 79 36 80 10 81 23 82 111 83 111 84 10 85 10 86 31 87 31 88 18 89 31 90 18 91 93 92 18 93 18 94 106 95 106 96 13 97 119 98 26 99 26 100 26 collatz_test03(): collatz_write() writes a Collatz sequence to a file. Write the Collatz sequence with key 27 to "collatz_27.txt". Write the Collatz count sequence from 1 to 100 to "collatz_count.txt". collatz_test04(): Plot the points of a Collatz sequence. Graphics saved as "collatz_sequence_27.png". collatz_test05(): Plot the Collatz max for starting values 1 to 100. Data saved as "collatz_max.txt". Graphics saved as "collatz_max.png". collatz_test06(): Plot the Collatz count for starting values 1 to 100. Graphics saved as "collatz_count.png". collatz_test07(): Plot the maximum Collatz count as n increases. Graphics saved as "collatz_count_max.png". lollatz_inverse_test(): lollatz_inverse() applies the inverse Lollatz permutation on a set of values U. U values: 3 4 5 6 7 11 13 T values: 2 6 4 9 5 8 10 lollatz_permutation_test(): lollatz_permutation() applies the Lollatz permutation on a set of values T. Lollatz permutation: Columns 1 through 13 1 2 3 4 5 6 7 8 9 10 11 12 13 1 3 2 5 7 4 9 11 6 13 15 8 17 Columns 14 through 20 14 15 16 17 18 19 20 19 10 21 23 12 25 27 lollatz_sequence_test(): lollatz_sequence() computes a Lollatz sequence with given starting value n. 5 7 9 6 4 5 Columns 1 through 13 8 11 15 10 13 17 23 31 41 55 73 97 129 Columns 14 through 20 86 115 153 102 68 91 121 mollatz_test() mollatz() computes the mollatz sequence for a given key. key: 5 Sequence length: 6 5 14 7 20 10 5 key: 6 Sequence length: 7 6 3 8 4 2 1 2 key: 19 Sequence length: 9 19 56 28 14 7 20 10 5 14 key: 27 Sequence length: 9 27 80 40 20 10 5 14 7 20 key: 95 Sequence length: 24 95 284 142 71 212 106 53 158 79 236 118 59 176 88 44 22 11 32 16 8 4 2 1 2 nollatz_test(): nollatz() computes the Nollatz sequence for a given key. key: 5 Sequence length: 6 5 6 3 4 2 1 key: 6 Sequence length: 5 6 3 4 2 1 key: 19 Sequence length: 9 19 20 10 5 6 3 4 2 1 key: 27 Sequence length: 8 27 28 14 7 8 4 2 1 key: 95 Sequence length: 10 95 96 48 24 12 6 3 4 2 1 collatz_test(): Normal end of execution. 16-Jun-2022 17:53:39