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.

User: Rahul Chand

Rahul Chand's wiki page.

Rahul Chand has authored 1 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.

Original entry on oeis.org

9, 97, 871, 6171, 77031, 837799, 8400511, 63728127, 670617279, 9780657630, 75128138247, 989345275647, 7887663552367, 80867137596217, 942488749153153, 7579309213675935, 93571393692802302, 931386509544713451
Offset: 1

Author

Rahul Chand, Apr 01 2017

Keywords

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

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.
		

Crossrefs

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