A284668 Numbers that have the largest Collatz total stopping time of all numbers below 10^n. The smallest number is chosen in case of ties.
9, 97, 871, 6171, 77031, 837799, 8400511, 63728127, 670617279, 9780657630, 75128138247, 989345275647, 7887663552367, 80867137596217, 942488749153153, 7579309213675935, 93571393692802302, 931386509544713451
Offset: 1
Keywords
Examples
For n=1, steps(1) to steps(9) take the following values: 0, 1, 7, 2, 5, 8, 16, 3, 19; the maximum of all those is 19 which occurs for steps(9) therefore a(1)=9.
Links
- Gary T. Leavens and Mike Vermeulen, 3x+1 Search Programs, Computers & Mathematics with Applications. 24 (11): 79-99 (1992).
- Eric Roosendaal, 3x+1 delay records
- Index entries for sequences related to 3x+1 (or Collatz) problem
Programs
-
Mathematica
Table[Last@Ordering@Array[If[#>1,#0@If[OddQ@#,3#+1,#/2]+1,0]&,10^k],{k,4}] (* Giorgos Kalogeropoulos, Apr 01 2021 *)
-
Python
def steps(n): if n==1: return 0 else: if (n%2)==0: return 1+steps(n//2) else: return 1+steps(3*n+1) def max_steps(i): a=max([[i, steps(i)] for i in range(1, 10**(i))], key=lambda x:x[1]) return a[0]
Formula
a(n) = max{i} (steps(i) for i in range from 1 to 10^n-1).
max(i) returns the i with the maximum steps(i) value.
where steps(n) is defined as follows
steps(n)= 0 if n=1.
1+steps(n/2) if n is even.
1+steps(3*n+1) if n is odd.
Extensions
Clarified and extended by Jens Kruse Andersen, Feb 23 2021
Comments