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.
%I A340418 #19 Jun 17 2025 20:17:18 %S A340418 1,2,3,5,7,11,19,29,39,53,61,73,79,101,149,229 %N A340418 Indices in A339991 where records occur. %C A340418 The records in A339991 corresponding the first 16 terms in this sequence are 0, 1, 4, 8, 9, 15, 22, 23, 24, 31, 32, 71, 88, 99, 104, 9267. %C A340418 A339991(397), which is > 249275, is still unknown. %C A340418 A339991(397) > 10^6. - _Michael S. Branicky_, Jan 09 2025 %t A340418 With[{s = Array[-1 + Length@ NestWhileList[Which[EvenQ@ #, #/2, PrimeQ@ #, #^2 - 1, True, # - 1] &, #, # > 1 &] &, 396]}, Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* _Michael De Vlieger_, Feb 12 2021 *) %o A340418 (Python) %o A340418 from sympy import isprime %o A340418 rec = -1 %o A340418 for n in range(1, 397): %o A340418 m, ct = n, 0 %o A340418 while m > 1: %o A340418 if m%2 == 0: m //= 2 %o A340418 elif isprime(m) == 1: m = m*m - 1 %o A340418 else: m -= 1 %o A340418 ct += 1 %o A340418 if ct > rec: print(n); rec = ct %Y A340418 Cf. A339991, A340008, A060412 (Collatz record indices). %K A340418 nonn,more %O A340418 1,2 %A A340418 _Ya-Ping Lu_, Jan 06 2021