OFFSET
1,2
EXAMPLE
a(1) = 1 thus 2 appears one time and sequence begins with 1, 2. Then 3 appears a(1) + a(2) = 3 times and sequence continues 1, 2, 3, 3, 3.
PROG
(PARI) sequence(n) = {
my(result = [1]);
for (i = 2, n,
for (j = 1, sum(k=1, i-1, result[k]), result = concat(result, i))
);
return(result);
} \\ Benoit Cloitre, Jul 20 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 29 2006
STATUS
approved