OFFSET
1,1
COMMENTS
This sequence gives indexes of multiplicative steps in A354833.
PROG
(PARI) { seen = Map(); v = 1; for (n=2, oo, mapput(seen, v, 0); v=if (mapisdefined(seen, w=v-n) || w<0, print1 (n", "); v*n, w)) }
(Python)
from itertools import count, islice
def agen():
an, seen = 1, {1}
for n in count(2):
t = an - n
if t not in seen and t >= 0: an = t
else: an *= n; yield n
seen.add(an)
print(list(islice(agen(), 25))) # Michael S. Branicky, Jul 02 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Rémy Sigrist, Jul 02 2022
EXTENSIONS
a(20)-a(25) from Michael S. Branicky, Jul 02 2022
STATUS
approved