login
A309898
For each b = 1, 2, 3, ... numbers k = 1, 2, 3, ... are inserted into the blanks within the sequence along with k * b blanks, skipping existing terms in the sequence.
2
1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 2, 1, 3, 1, 5, 2, 1, 1, 2, 3, 6, 4, 1, 1, 2, 1, 1, 7, 3, 2, 1, 5, 1, 4, 2, 8, 1, 3, 1, 2, 1, 1, 2, 6, 9, 3, 4, 1, 1, 5, 2, 1, 1, 3, 10, 2, 1, 1, 7, 4, 2, 1, 3, 1, 2, 11, 1, 5, 6, 1, 2, 3, 4, 1, 8, 1, 2, 12, 1, 1, 3, 2, 1, 1, 4, 5, 2, 1, 3, 7, 13
OFFSET
1,3
COMMENTS
b = 1 for all blanks forms A003602. b = k yields A002260.
LINKS
EXAMPLE
The first 21 terms are constructed as follows:
1 _ 2 _ _ 3 _ _ _ 4 _ _ _ _ 5 _ _ _ _ _ .
1 _ _ 2 _ _ _ _ 3 _ _ _ _ _ _ .
1 _ _ _ 2 _ _ _ _ _ _ 3 .
1 _ _ _ _ 2 _ _ _ .
1 _ _ _ _ _ 2 .
1 _ _ _ _ .
1 _ _ _ .
1 _ _ .
1 _ .
1 .
1 1 2 1 1 3 2 1 1 4 2 1 3 1 5 2 1 1 2 3 .
PROG
(Python)
seq = []
b = 2
for n in range(1, 100):
seq += [n] + [-1] * n
while -1 in seq:
i = seq.index(-1)
seq[i] = 1
k = 2
blanks = b
for s in range(i + 1, len(seq)):
if seq[s] == -1:
blanks -= 1
if blanks < 0:
seq[s] = k
blanks = k * b
k += 1
b += 1
print(seq)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jan Koornstra, Aug 21 2019
STATUS
approved