login
A117806
n appears {a(1) + a(2) + ... + a(n-1)} times (with a(1) = 1).
0
1, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10
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
Sequence in context: A103586 A194847 A262070 * A351115 A085423 A260998
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 29 2006
STATUS
approved