OFFSET
1,4
EXAMPLE
At stage n >= 1 we only look at the numbers 1 up to n, and ignore numbers bigger than n.
Stage 0: start with a(1) = 1, a(2) = 1.
Stage 1: we see 1's at 1,2, so we adjoin 1,2, getting 1,1, 1,2.
Stage 2: we see 1's at 1,2,3, and 2's at 4, so we adjoin 1,2,3,4, getting 1,1,1,2, 1,2,3,4.
Stage 3: we see 1's at 1,2,3,5, 2's at 4,6 and 3's at 7, so we adjoin 1,2,3,5,4,6,7, getting 1,1,1,2,1,2,3,4, 1,2,3,5,4,6,7.
Stage 4: we see 1's at 1,2,3,5,9, 2's at 4,6,10, 3's at 7,11, 4's at 8,13, so we adjoin 1,2, ..., 8,13 and so on.
We obtain an irregular triangle by writing the results of the stages as separate rows:
1, 1,
1, 2,
1, 2, 3, 4,
1, 2, 3, 5, 4, 6, 7,
1, 2, 3, 5, 9, 4, 6, 10, 7, 11, 8, 13,
1, 2, 3, 5, 9, 16, 4, 6, 10, 17, 7, 11, 18, 8, 13, 21, 12, 19,
1, 2, 3, 5, 9, 16, 28, 4, 6, 10, 17, 29, 7, 11, 18, 30, 8, 13, 21, 34, 12, 19, 31, 14, 22, 35,
... (N. J. A. Sloane, Nov 07 2022)
PROG
(Python)
terms = [1, 1]
for i in range(1, 11):
new_terms = []
for j in range(1, i+1):
for k in range(len(terms)):
if terms[k] == j: new_terms.append(k+1)
terms.extend(new_terms)
print(terms) # Gleb Ivanov, Nov 01 2022
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Ctibor O. Zizka, Oct 29 2022
STATUS
approved