login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A340418
Indices in A339991 where records occur.
4
1, 2, 3, 5, 7, 11, 19, 29, 39, 53, 61, 73, 79, 101, 149, 229
OFFSET
1,2
COMMENTS
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.
A339991(397), which is > 249275, is still unknown.
A339991(397) > 10^6. - Michael S. Branicky, Jan 09 2025
MATHEMATICA
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 *)
PROG
(Python)
from sympy import isprime
rec = -1
for n in range(1, 397):
m, ct = n, 0
while m > 1:
if m%2 == 0: m /= 2
elif isprime(m) == 1: m = m*m - 1
else: m -= 1
ct += 1
if ct > rec: print(n); rec = ct
CROSSREFS
Cf. A339991, A340008, A060412 (Collatz record indices).
Sequence in context: A083771 A158069 A039726 * A115617 A003064 A057429
KEYWORD
nonn,more,changed
AUTHOR
Ya-Ping Lu, Jan 06 2021
STATUS
approved