A309899 Numbers k = 1, 2, 3, ... are added to the sequence along with k blanks. Next, the numbers k + 1 are inserted on the blanks along with k + 1 blanks. This process is then repeated.
1, 2, 2, 3, 4, 3, 3, 5, 6, 4, 4, 4, 7, 8, 5, 5, 9, 5, 5, 10, 6, 6, 11, 12, 6, 6, 6, 7, 7, 13, 14, 8, 7, 7, 15, 8, 7, 7, 16, 9, 17, 8, 8, 18, 9, 10, 8, 8, 8, 19, 20, 9, 9, 11, 10, 21, 22, 9, 9, 12, 9, 9, 10, 10, 23, 11, 24, 13, 25, 10, 10, 11, 26
Offset: 1
Examples
The first elements are: 1 _ 2 _ _ 3 _ _ _ 4 _ _ _ _ 5 _ _ _ _ _ 2 _ _ 3 _ _ _ 4 _ _ _ _ 5 _ _ 3 _ _ _ 4 _ _ _ _ 5 _ 4 _ _ _ _ 5 _ _ 5 _ _ _ _ _ . 1 2 2 3 4 3 3 5 6 4 4 4 7 8 5 5 9 5 5 10
Links
- Jan Koornstra, Table of n, a(n) for n = 1..10000
Programs
-
Python
seq = [] for n in range(1, 100): seq += [n] + n*[-1] for n in range(2, len(seq)): value = n gaps = 0 position = n - 1 while position < len(seq): if seq[position] == -1: if gaps > 0: gaps -= 1 else: seq[position] = value gaps = value value += 1 position += 1 print(seq)