OFFSET
1,2
COMMENTS
See comment in A388262 regarding computation of A388263(24)-A388263(30). - Michael S. Branicky, Sep 21 2025
LINKS
MATHEMATICA
r = -1; Monitor[Reap[Do[q = 1; If[# > r, r = #; Sow[n]] &[-1 + Length@ NestWhileList[If[EvenQ[#], #/2, # + Set[q, NextPrime[q]]] &, n, # > 1 &]], {n, 2^14}]][[-1, 1]], n] (* Michael De Vlieger, Sep 16 2025 *)
PROG
(Python)
from sympy import nextprime
from itertools import count, islice
def sisyphus(start): # generator of Sisyphus sequence beginning at start
an, p = start, 1
while True: yield an; an = an+(p:=nextprime(p)) if an&1 else an>>1
def b(n): # A388038
return next(k for k, t in enumerate(sisyphus(n)) if t == 1)
def agen(): # generator of terms
record = -1
for k in count(1):
if (v:=b(k)) > record: yield k; record = v
print(list(islice(agen(), 16))) # Michael S. Branicky, Sep 16 2025
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Michael S. Branicky and James C. McMahon, Sep 16 2025
EXTENSIONS
a(27)-a(31) from Michael S. Branicky, Sep 23 2025
STATUS
approved
