A376905 Lexicographically earliest sequence of distinct positive integers with a(1) multiples of a number b(1) followed by a(2) multiples of a number b(2) etc.
1, 2, 4, 3, 6, 9, 12, 5, 10, 15, 7, 14, 21, 28, 35, 42, 8, 16, 24, 32, 40, 48, 56, 64, 72, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 13, 26, 39, 52, 65, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 18, 36, 54, 90, 108, 126, 144, 162, 180, 198, 216
Offset: 1
Examples
The first terms/rows are: n a(n) b(n) n-th row - ---- ---- ------------------------------------------------- 1 1 1 1 2 2 2 2, 4 3 4 3 3, 6, 9, 12 4 3 5 5, 10, 15 5 6 7 7, 14, 21, 28, 35, 42 6 9 8 8, 16, 24, 32, 40, 48, 56, 64, 72 7 12 11 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132 8 5 13 13, 26, 39, 52, 65 9 10 17 17, 34, 51, 68, 85, 102, 119, 136, 153, 170
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10063
- Rémy Sigrist, PARI program
- Index entries for sequences that are permutations of the natural numbers
Programs
-
PARI
\\ See Links section.
-
Python
from itertools import count, islice def A376905gen(): # generator of terms aset, alst, m = {1, 2, 4}, [1, 2, 4], 3 yield from [1, 2, 4] for n in count(3): nlst = [] for k in count(m, m): if k not in aset: nlst.append(k) if len(nlst) == alst[n-1]: break yield from nlst alst.extend(nlst) aset.update(nlst) while m in aset: m += 1 print(list(islice(A376905gen(), 70))) # Michael S. Branicky, Oct 16 2024
Comments