OFFSET
1,2
COMMENTS
This sequence is a permutation of the positive integers with inverse A360600:
- we already know that all terms are distinct, so we just have to show that all integers appear,
- by contradiction: let r be the least value missing from this sequence,
- once the values 1..r-1 have appeared in this sequence, the sequence A360598 can only decrease finitely many times,
- the next increase in A360598 will correspond to the ratio r.
LINKS
EXAMPLE
PROG
(PARI) See Links section.
(Python)
from itertools import islice
def agen(): # generator of terms
an, ratios = 1, set()
while True:
k = 1
q, r = divmod(max(k, an), min(k, an))
while r != 0 or q in ratios:
k += 1
q, r = divmod(max(k, an), min(k, an))
an = k
ratios.add(q)
yield q
print(list(islice(agen(), 66))) # Michael S. Branicky, Feb 13 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Feb 13 2023
STATUS
approved