OFFSET
1,2
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10021
Rémy Sigrist, PARI program
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
KEYWORD
nonn,tabf
AUTHOR
Rémy Sigrist, Oct 08 2024
STATUS
approved