A260593 The values of the modified Syracuse algorithm, msa, in the order in which they appear in A260590.
4, 2, 7, 5, 59, 56, 8, 54, 51, 45, 42, 31, 15, 40, 21, 29, 13, 12, 20, 27, 24, 10, 16, 18, 23, 39, 81, 35, 37, 26, 80, 34, 78, 43, 32, 61, 58, 50, 48, 46, 70, 65, 69, 53, 64, 77, 73, 72, 105, 75, 67, 83, 62, 92, 135, 126, 86, 111, 129, 124, 123, 127, 88, 119, 108, 100
Offset: 1
Examples
Every odd number greater than 1 yields a msa value. a(1) is 4 and it corresponds to A260590(1). a(2) is 2 since A260590(2) is 2. a(3) is 7 since A260590(3) is 7. a(4) is 5 since A260590(5) is 5, A260590(4) is 2 but it already appears as a(2).
Programs
-
Mathematica
msa[n_] := If[ OddQ@ n, (3n + 1)/2, n/2]; f[n_] := Block[{k = 2n + 1}, Length@ NestWhileList[ msa@# &, k, # >= k &] - 1]; k = 1; lst = {}; While[k < 10000001, a = f@ k; If[ !MemberQ[lst, a], AppendTo[lst, a]]; k++]; lst
Comments