OFFSET

1,3

COMMENTS

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.

EXAMPLE

k denotes the k-th iteration

The sequence is initialized with (1, 1)

For k = 1

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

For k = 2

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

For k = 3

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

For k = 4

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

PROG

(Python)

def a_list(n):

if n <= 2:

return 1

sequence = [1, 1]

target_number_index = 0

times_to_add = sequence[target_number_index]

for _ in range(n - 2):

if times_to_add == 0:

target_number_index += 1

times_to_add = sequence[target_number_index]

last_term = sequence[-1]

sequence.append(last_term + sequence[target_number_index])

times_to_add -= 1

return sequence

CROSSREFS

KEYWORD

easy,nonn

AUTHOR

Wagner Martins, Jul 09 2023

STATUS

approved