cp's OEIS Frontend

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.

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.

This page as a plain text file.
%I A284668 #38 Mar 23 2025 21:54:01
%S A284668 9,97,871,6171,77031,837799,8400511,63728127,670617279,9780657630,
%T A284668 75128138247,989345275647,7887663552367,80867137596217,
%U A284668 942488749153153,7579309213675935,93571393692802302,931386509544713451
%N 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.
%C A284668 Collatz stopping time is defined as the number of steps that a number n takes to converge to 1 using one of the following steps:
%C A284668   0) if n is 1, stop.
%C A284668   1) if n is even, divide n by 2 (n/2).
%C A284668   2) if n is odd, multiply n by 3 and add 1 (3n+1).
%C A284668 Subsequence of A006877. The first tie occurs at a(10) which is tied with 9780657631. - _Jens Kruse Andersen_, Feb 23 2021
%H A284668 Gary T. Leavens and Mike Vermeulen, <a href="https://doi.org/10.1016/0898-1221(92)90034-F">3x+1 Search Programs</a>, Computers & Mathematics with Applications. 24 (11): 79-99 (1992).
%H A284668 Eric Roosendaal, <a href="http://www.ericr.nl/wondrous/delrecs.html">3x+1 delay records</a>
%H A284668 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%F A284668 a(n) = max{i} (steps(i) for i in range from 1 to 10^n-1).
%F A284668 max(i) returns the i with the maximum steps(i) value.
%F A284668 where steps(n) is defined as follows
%F A284668 steps(n)= 0 if n=1.
%F A284668           1+steps(n/2) if n is even.
%F A284668           1+steps(3*n+1) if n is odd.
%e A284668 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.
%t A284668 Table[Last@Ordering@Array[If[#>1,#0@If[OddQ@#,3#+1,#/2]+1,0]&,10^k],{k,4}] (* _Giorgos Kalogeropoulos_, Apr 01 2021 *)
%o A284668 (Python)
%o A284668 def steps(n):
%o A284668     if n==1:
%o A284668         return 0
%o A284668     else:
%o A284668         if (n%2)==0:
%o A284668             return 1+steps(n//2)
%o A284668         else:
%o A284668             return 1+steps(3*n+1)
%o A284668 def max_steps(i):
%o A284668     a=max([[i, steps(i)] for i in range(1, 10**(i))], key=lambda x:x[1])
%o A284668     return a[0]
%Y A284668 Cf. A006577, A006877.
%K A284668 nonn
%O A284668 1,1
%A A284668 _Rahul Chand_, Apr 01 2017
%E A284668 Clarified and extended by _Jens Kruse Andersen_, Feb 23 2021