This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A370350 #28 Mar 28 2024 16:11:26 %S A370350 0,4,3,2,1,7,17,6,16,5,15,5,5,14,4,4,13,11,11,3,12,10,10,20,2,11,9,9, %T A370350 19,8,69,10,8,8,18,17,18,68,9,7,7,8,77,16,17,67,8,17,8,6,7,76,15,7,16, %U A370350 66,7,16,7,6,75,6,75,14,6,6,16,65,6,15,6,15,24,74 %N A370350 Number of steps to go from n to 1 in a variant of the Collatz iteration x -> (x / 5 if 5 divides x, x + (x+(5-(x mod 5)))/5 otherwise), or -1 if 1 is never reached. %C A370350 Because ceiling(a/b) = (a+(b-(a mod b)))/b, this sequence equals the total number of steps to reach 1 in a variant of the Collatz problem using the iteration f(x) := x/k if k divides x, x+ceiling(x/k) otherwise. %C A370350 Specifically, here we set k=5 because it is the next integer (after 2) that is not in A368136; i.e. the iteration used here has no loops for starting values up to 5*5=25, apart from the loop containing 1. %C A370350 It is not known if there exists n such that a(n) = -1 (either by iteration reaching a non-elementary loop which implies n>5*5, or by iteration growing without bound). %H A370350 Giuseppe Ciacco, <a href="/A370350/b370350.txt">Table of n, a(n) for n = 1..10000</a> %H A370350 Walter Carnielli, <a href="https://www.emis.de/journals/AMEN/2015/AMEN(150711).pdf">Some natural generalizations of the Collatz Problem</a>, Applied Mathematics E-Notes 15 (2015): 207-215. %H A370350 Wikipedia, <a href="https://en.wikipedia.org/wiki/Collatz_conjecture">Collatz Conjecture</a>. %H A370350 OEIS Wiki, <a href="https://oeis.org/wiki/3x%2B1_problem">3x+1 problem</a>. %e A370350 For n = 11, the following trajectory is obtained: %e A370350 11, 14, 17, 21, 26, 32, 39, 47, 57, 69, 83, 100, 20, 4, 5, 1 %e A370350 which requires 15 steps to reach 1, therefore a(11) = 15. %t A370350 s={};Do[c=0;a=n;While[a>1,If[Divisible[a,5],a=a/5,a=a+Ceiling[a/5]];c++];AppendTo[s,c],{n,74}];s (* _James C. McMahon_, Feb 28 2024 *) %o A370350 (Python) %o A370350 def a(n, C = 5): %o A370350 s = 0 %o A370350 while n > 1: %o A370350 d, r = divmod(n, C) %o A370350 n = n + 1 + d if r else d %o A370350 s += 1 %o A370350 return s %o A370350 print([a(n) for n in range(1, 75)]) %o A370350 # _Giuseppe Ciacco_ and _Robert Munafo_, Mar 25 2024 %Y A370350 Cf. A006666, A368136. %K A370350 nonn,easy,look %O A370350 1,2 %A A370350 _Giuseppe Ciacco_, Feb 16 2024