login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
9, 97, 871, 6171, 77031, 837799, 8400511, 63728127, 670617279, 9780657630, 75128138247, 989345275647, 7887663552367, 80867137596217, 942488749153153, 7579309213675935, 93571393692802302, 931386509544713451
OFFSET
1,1
COMMENTS
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:
0) if n is 1, stop.
1) if n is even, divide n by 2 (n/2).
2) if n is odd, multiply n by 3 and add 1 (3n+1).
Subsequence of A006877. The first tie occurs at a(10) which is tied with 9780657631. - Jens Kruse Andersen, Feb 23 2021
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
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.
EXAMPLE
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.
MATHEMATICA
Table[Last@Ordering@Array[If[#>1, #0@If[OddQ@#, 3#+1, #/2]+1, 0]&, 10^k], {k, 4}] (* Giorgos Kalogeropoulos, Apr 01 2021 *)
PROG
(Python 3.4)
def steps(n):
if n==1:
return 0
else:
if (n%2)==0:
return 1+steps(int(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]
CROSSREFS
Sequence in context: A158489 A069636 A069621 * A232229 A240780 A236672
KEYWORD
nonn
AUTHOR
Rahul Chand, Apr 01 2017
EXTENSIONS
Clarified and extended by Jens Kruse Andersen, Feb 23 2021
STATUS
approved