A260590 The modified Syracuse algorithm, msa, applied to 2n+1.
4, 2, 7, 2, 5, 2, 7, 2, 4, 2, 5, 2, 59, 2, 56, 2, 4, 2, 8, 2, 5, 2, 54, 2, 4, 2, 5, 2, 7, 2, 54, 2, 4, 2, 51, 2, 5, 2, 8, 2, 4, 2, 5, 2, 45, 2, 8, 2, 4, 2, 42, 2, 5, 2, 31, 2, 4, 2, 5, 2, 8, 2, 15, 2, 4, 2, 7, 2, 5, 2, 7, 2, 4, 2, 5, 2, 40, 2, 21, 2, 4, 2, 29, 2, 5, 2, 8, 2, 4, 2, 5, 2, 7, 2, 13
Offset: 1
Keywords
Examples
a(1) is 4 because 2n+1 is 3 and 3 -> 5 -> 8 -> 4 -> 2. The number of iterations of the msa is 4; a(2) is 2 because 2n+1 is 5 and 5 -> 8 -> 4. The number of iterations of the msa is 2; a(3) is 7 because 2n+2 is 7 and 7 -> 11 -> 17 -> 26 -> 13 -> 20 -> 10 -> 5. The number of iterations of the msa is 7; etc. Also see The Modified Syracuse Algorithm link.
Links
- Danny Rorabaugh, Table of n, a(n) for n = 1..10000
- Encyclopedia of Mathematics, Syracuse problem.
- Joseph K. Horn, HHC 2014, HP Handheld Conference, Sept. 20-21, 2014, Reno, NV, Hailstone Numbers: A Pattern Has Been Found.
- Joseph K. Horn, The Modified Syracuse Algorithm.
- Eric Weisstein's World of Mathematics, The Syracuse Algorithm
- Wikipedia, Collatz conjecture. particularly Section "Cycles".
Programs
-
Mathematica
msa[n_] := If[ OddQ@ n, (3n + 1)/2, n/2]; f[n_] := Block[{k = 2n + 1}, Length@ NestWhileList[ msa@# &, k, # >= k &] - 1]; Array[f, 95]
Formula
a(n) = the number of iterations for the msa; i.e., the number of mappings of x -> (3x+1)/2 if x is odd or -> x/2 if x is even to arrive at a number less than n.
a(n) = the binary length of A260592(n).
Comments