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.

A377009 Number of odd terms in the Collatz trajectory of k = 4n-1 which are a new record high among its odd terms.

This page as a plain text file.
%I A377009 #19 Oct 31 2024 01:52:00
%S A377009 1,2,1,3,1,2,14,13,1,3,1,12,1,12,2,11,1,11,1,3,11,2,11,10,1,10,10,10,
%T A377009 1,2,2,6,1,2,1,9,10,2,9,8,1,9,9,8,1,8,2,5,8,9,1,8,1,8,3,7,1,8,9,7,8,2,
%U A377009 8,7,8,7,1,3,7,2,7,4,7,3,8,3,1,7,2,6,7,8,1,6,4,6,7,6,1,6,1,4,1,2,3,6,7,6,6,6
%N A377009 Number of odd terms in the Collatz trajectory of k = 4n-1 which are a new record high among its odd terms.
%C A377009 For these k = 4n-1, the first odd number is A139391(k) > k so it is the first record high.
%C A377009 The trajectory of k starts with A001511(n) successive initial records, so that a(n) >= A001511(n) (and reaches A351974(n) at that point).
%H A377009 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%F A377009 a(n) = A376996(4n-1).
%F A377009 a(n) = A001511(n) + A376996(A351974(n)).
%e A377009 For n = 7, which corresponds to the Collatz trajectory started from 27, the trajectory reaches larger maximum odd numbers at the following points: 41, 47, 71, 107, 233, 263, 395, 593, 719, 1079, 1619, 2429, 3077. Since there are 14 instances where a new maximum odd number is reached, we have a(7)=14.
%o A377009 (Python)
%o A377009 def a(num:int) -> int:
%o A377009     count = 0
%o A377009     num = num * 4 - 1
%o A377009     maxnum = num
%o A377009     while num > 1:
%o A377009         if num%2 == 1:
%o A377009             num = num*3 + 1
%o A377009         while num%2 == 0:
%o A377009             num //= 2
%o A377009         if num > maxnum:
%o A377009             count += 1
%o A377009             maxnum = num
%o A377009     return count
%Y A377009 Cf. A139391, A334040, A376996, A001511, A351974.
%K A377009 nonn
%O A377009 1,2
%A A377009 _Chia-Ching Chen_, Oct 12 2024