login
A376903
Lexicographically earliest sequence of distinct positive integers with a(1) multiples of 1 followed by a(2) multiples of 2 etc.
4
1, 2, 4, 3, 6, 9, 12, 8, 16, 20, 5, 10, 15, 25, 30, 35, 18, 24, 36, 42, 48, 54, 60, 66, 72, 7, 14, 21, 28, 49, 56, 63, 70, 77, 84, 91, 98, 32, 40, 64, 80, 88, 96, 104, 112, 27, 45, 81, 90, 99, 108, 117, 126, 135, 144, 153, 162, 171, 180, 189, 198, 50, 100, 110, 120
OFFSET
1,2
COMMENTS
This sequence combines features of Golomb's sequence (A001462) and A075383.
This sequence is a permutation of the positive integers with inverse A376904.
This sequence can also be seen as an irregular table whose n-th row contains a(n) multiples of n.
EXAMPLE
The first terms/rows are:
n a(n) n-th row
- ---- ---------------------------------------------
1 1 1
2 2 2, 4
3 4 3, 6, 9, 12
4 3 8, 16, 20
5 6 5, 10, 15, 25, 30, 35
6 9 18, 24, 36, 42, 48, 54, 60, 66, 72
7 12 7, 14, 21, 28, 49, 56, 63, 70, 77, 84, 91, 98
PROG
(PARI) \\ See Links section.
(Python)
from itertools import count, islice
def A376903gen(): # generator of terms
aset, alst = {1, 2, 4}, [1, 2, 4]
yield from [1, 2, 4]
for n in count(3):
nlst = []
for k in count(n, n):
if k not in aset:
nlst.append(k)
if len(nlst) == alst[n-1]:
break
yield from nlst
alst.extend(nlst)
aset.update(nlst)
print(list(islice(A376903gen(), 100))) # Michael S. Branicky, Oct 16 2024
CROSSREFS
Sequence in context: A363504 A376905 A332878 * A113233 A051849 A283961
KEYWORD
nonn,tabf
AUTHOR
Rémy Sigrist, Oct 08 2024
STATUS
approved