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.

A351104 Numbers that begin a record-length run of consecutive numbers having the same Collatz trajectory length.

This page as a plain text file.
%I A351104 #29 Mar 09 2022 00:40:20
%S A351104 1,12,28,98,386,943,1494,1680,2987,7083,57346,252548,331778,524289,
%T A351104 596310,2886352,3247146,3264428,4585418,5158596,5772712,13019668,
%U A351104 18341744,24455681,98041684,136696632,271114753,361486064,406672385,481981441,711611184,722067240
%N A351104 Numbers that begin a record-length run of consecutive numbers having the same Collatz trajectory length.
%C A351104 It appears that this sequence is infinite.
%C A351104 For every record number of consecutive identical terms in A006577, the index of the first of those consecutive terms is a term of this sequence.
%C A351104 This sequence is interesting because when A006577 is graphed on a scatter plot, it is immediately obvious that there are many runs of terms having the same value.
%e A351104 a(4)=98 since the length of the Collatz trajectory of each number from 98 through 102 is of length 25 and this is the fourth record length.
%e A351104 From _Jon E. Schoenfield_, Feb 01 2022: (Start)
%e A351104       trajectory  numbers in run   run
%e A351104    n    length    (1st is a(n))   length
%e A351104   --  ----------  --------------  ------
%e A351104    1        1        1               1
%e A351104    2        9       12, 13           2
%e A351104    3       18       28, 29, 30       3
%e A351104    4       25       98 ...  102      5
%e A351104    5      120      386 ...  391      6
%e A351104    6       36      943 ...  949      7
%e A351104    7       47     1494 ... 1501      8
%e A351104    8       42     1680 ... 1688      9
%e A351104    9       48     2987 ... 3000     14
%e A351104   10       57     7083 ... 7099     17
%e A351104 (End)
%o A351104 (Python)
%o A351104 import numpy as np
%o A351104 def find_records(m):
%o A351104     l=np.array([0]+[-1 for i in range(m-1)])
%o A351104     for n in range(len(l)):
%o A351104         path=[n+1]
%o A351104         while path[-1]>m or l[path[-1]-1]==-1:
%o A351104             if path[-1]%2==0:
%o A351104                 path.append(path[-1]//2)
%o A351104             else:
%o A351104                 path.append(path[-1]*3+1)
%o A351104         path.reverse()
%o A351104         for i in range(1, len(path)):
%o A351104             if path[i]<=m:
%o A351104                 l[path[i]-1]=l[path[0]-1]+i
%o A351104     ciclr=[]
%o A351104     c=1
%o A351104     lsteps=0
%o A351104     record=0
%o A351104     for n in range(1, len(l)):
%o A351104         if l[n]==lsteps:
%o A351104             c+=1
%o A351104         else:
%o A351104             if c>record:
%o A351104                 record=c
%o A351104                 ciclr.append(n-c+1)
%o A351104             c=1
%o A351104         lsteps=l[n]
%o A351104     return ciclr
%o A351104 print(", ".join([str(i) for i in find_records(1000000)]))
%Y A351104 For length of run see A351224.
%K A351104 nonn
%O A351104 1,2
%A A351104 _Nathan John Eaves_, Jan 31 2022