The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 0

%I #30 Apr 20 2021 10:12:29

%S 9,97,871,6171,77031,837799,8400511,63728127,670617279,9780657630,

%T 75128138247,989345275647,7887663552367,80867137596217,

%U 942488749153153,7579309213675935,93571393692802302,931386509544713451

%N 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 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 0) if n is 1, stop.

%C 1) if n is even, divide n by 2 (n/2).

%C 2) if n is odd, multiply n by 3 and add 1 (3n+1).

%C Subsequence of A006877. The first tie occurs at a(10) which is tied with 9780657631. - _Jens Kruse Andersen_, Feb 23 2021

%H 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 Eric Roosendaal, <a href="http://www.ericr.nl/wondrous/delrecs.html">3x+1 delay records</a>

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%F a(n) = max{i} (steps(i) for i in range from 1 to 10^n-1).

%F max(i) returns the i with the maximum steps(i) value.

%F where steps(n) is defined as follows

%F steps(n)= 0 if n=1.

%F 1+steps(n/2) if n is even.

%F 1+steps(3*n+1) if n is odd.

%e 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 Table[Last@Ordering@Array[If[#>1,#0@If[OddQ@#,3#+1,#/2]+1,0]&,10^k],{k,4}] (* _Giorgos Kalogeropoulos_, Apr 01 2021 *)

%o (Python 3.4)

%o def steps(n):

%o if n==1:

%o return 0

%o else:

%o if (n%2)==0:

%o return 1+steps(int(n/2))

%o else:

%o return 1+steps(3*n+1)

%o def max_steps(i):

%o a=max([[i,steps(i)] for i in range(1,10**(i))],key=lambda x:x[1])

%o return a[0]

%Y Cf. A006577, A006877.

%K nonn

%O 1,1

%A _Rahul Chand_, Apr 01 2017

%E Clarified and extended by _Jens Kruse Andersen_, Feb 23 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 14:39 EDT 2024. Contains 372554 sequences. (Running on oeis4.)