login
Add each term m of the sequence to the last one m times starting with 1, 1.
0

%I #37 Aug 06 2023 14:07:21

%S 1,1,2,3,5,7,10,13,16,21,26,31,36,41,48,55,62,69,76,83,90,100,110,120,

%T 130,140,150,160,170,180,190,203,216,229,242,255,268,281,294,307,320,

%U 333,346,359,375,391,407,423,439,455,471,487,503,519,535,551,567

%N Add each term m of the sequence to the last one m times starting with 1, 1.

%C a(n) seems to grow as n^c where c is a constant with the value of approximately 1.625, in other words, lim_{n->oo} log_n(a(n)) seems to converge.

%e k denotes the k-th iteration

%e The sequence is initialized with (1, 1)

%e For k = 1

%e Add a(1) = 1 once, you get (1, 1, 2)

%e For k = 2

%e Add a(2) = 1 once, you get (1, 1, 2, 3)

%e For k = 3

%e Add a(3) = 2 twice, you get (1, 1, 2, 3, 5, 7)

%e For k = 4

%e add a(4) = 3 three times, and you get (1, 1, 2, 3, 5, 7, 10, 13, 16)

%o (Python)

%o def a_list(n):

%o if n <= 2:

%o return 1

%o sequence = [1, 1]

%o target_number_index = 0

%o times_to_add = sequence[target_number_index]

%o for _ in range(n - 2):

%o if times_to_add == 0:

%o target_number_index += 1

%o times_to_add = sequence[target_number_index]

%o last_term = sequence[-1]

%o sequence.append(last_term + sequence[target_number_index])

%o times_to_add -= 1

%o return sequence

%Y Cf. A100143.

%K easy,nonn

%O 1,3

%A _Wagner Martins_, Jul 09 2023