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.

A350277 Indices of records in A349325.

This page as a plain text file.
%I A350277 #23 Jan 10 2022 13:41:13
%S A350277 1,3,6,7,14,19,54,73,129,313,353,470,5838,10855,14473,26283,60220,
%T A350277 60221,155897,445089,1098406,1168014,1169865,4143030,8546945,10964814,
%U A350277 11395926,31273927,590633697,1117772702,1240568869,1240568870,2845683047,2963752572,2963752573
%N A350277 Indices of records in A349325.
%H A350277 Chai Wah Wu, <a href="/A350277/b350277.txt">Table of n, a(n) for n = 1..39</a>
%H A350277 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%t A350277 A349325[n_]:=Module[{h=1,c=n,prevc=n},While[c>1,If[OddQ[c],c=(3c+1)/2;If[prevc<n&&c>n,h++],c/=2^IntegerExponent[c,2];If[prevc>n&&c<n,h++]];prevc=c];h]
%t A350277 upto=10000;a={};rec=-1;Do[If[(r=A349325[i])>rec,rec=r;AppendTo[a,i]],{i,upto}];a
%o A350277 (Python)
%o A350277 def A349325(n):
%o A350277     prevc = c = n
%o A350277     h = 1
%o A350277     while c > 1:
%o A350277         if c % 2:
%o A350277             c = (3*c+1) // 2
%o A350277             if prevc < n and c > n: h += 1
%o A350277         else:
%o A350277             c //= 2
%o A350277             if prevc > n and c < n: h += 1
%o A350277         prevc = c
%o A350277     return h
%o A350277 rec, rec_idx = -1, []
%o A350277 for i in range(1, 10000):
%o A350277     r = A349325(i)
%o A350277     if r > rec:
%o A350277         rec = r
%o A350277         rec_idx.append(i)
%o A350277 print(rec_idx)
%Y A350277 Cf. A349325, A350278.
%K A350277 nonn,hard
%O A350277 1,2
%A A350277 _Paolo Xausa_, Dec 22 2021
%E A350277 a(24)-a(35) from _Chai Wah Wu_, Jan 04 2022