OFFSET
1,3
COMMENTS
This sequence is a variant of A128117.
The sequence is well defined:
- the first row must start with a value 1, so a(1) = 1, and the first row is (1),
- the second row must start with a value 1, so a(2) = 1, and the second row is (1, 2),
- subsequent rows are determined by terms in prior rows.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10256 (rows for n = 1..68 flattened)
Rémy Sigrist, Scatterplot of the terms in rows for n = 1..500
EXAMPLE
The first terms and rows are:
n a(n) n-th row
-- ---- ----------------------------------------
1 1 1
2 1 1, 2
3 2 1, 1, 2, 2, 3, 3
4 1 1, 2, 3, 4
5 1 1, 2, 3, 4, 5
6 2 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6
7 2 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
MAPLE
a:= proc() local k, l: k, l:= 3, [1$2, 2];
proc(n)
while nops(l)<n do
l, k:= [l[], seq(i$a(k), i=1..k)], k+1
od: l[n]
end
end():
seq(a(n), n=1..95); # Alois P. Heinz, Feb 13 2022
PROG
(PARI) a = vector(95, n, 1); m=0; for (n=1, 9, for (k=1, n, for (t=1, a[n], print1 (a[m++]=k", "))))
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Feb 09 2022
STATUS
approved