A360598 Lexicographically earliest sequence of positive integers such that the ratios between successive terms, { max(a(n), a(n+1)) / min(a(n), a(n+1)), n > 0 }, are distinct integers.
1, 1, 2, 6, 1, 4, 20, 1, 7, 56, 1, 9, 90, 1, 11, 132, 1, 13, 182, 1, 15, 240, 1, 17, 306, 1, 19, 399, 1, 22, 506, 1, 24, 600, 1, 26, 702, 1, 28, 812, 1, 30, 930, 1, 32, 1056, 1, 34, 1190, 1, 36, 1332, 1, 38, 1482, 1, 40, 1640, 1, 42, 1806, 1, 44, 1980, 1, 46
Offset: 1
Keywords
Examples
The first terms, alongside the corresponding ratios, are: n a(n) Ratio between a(n) and a(n+1) -- ---- ----------------------------- 1 1 1 2 1 2 3 2 3 4 6 6 5 1 4 6 4 5 7 20 20 8 1 7 9 7 8 10 56 56 11 1 9 12 9 10
Programs
-
PARI
See Links section.
-
Python
from itertools import islice def agen(): # generator of terms an, ratios = 1, set() while True: yield an 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) print(list(islice(agen(), 66))) # Michael S. Branicky, Feb 13 2023
Comments