login
A309971
a(1) = 1, a(2) = 2; a(n) = round((n-a(n-1))/a(n-2)) for n > 2.
2
1, 2, 1, 2, 3, 2, 2, 3, 3, 2, 3, 5, 3, 2, 4, 6, 3, 3, 5, 5, 3, 4, 6, 5, 3, 5, 7, 4, 4, 7, 6, 4, 5, 7, 6, 4, 6, 8, 5, 4, 7, 9, 5, 4, 8, 10, 5, 4, 9, 10, 5, 5, 10, 9, 5, 6, 10, 8, 5, 7, 11, 7, 5, 8, 11, 7, 5, 9, 12, 6, 5, 11, 12, 6, 6, 12, 11, 6, 7, 12, 10, 6, 8, 13, 9, 6, 9, 13, 8, 6, 11, 14
OFFSET
1,2
COMMENTS
Inspired by A308622.
EXAMPLE
a(4) = 2 because a(4) = round((4-1)/2) = 2.
PROG
(PARI) q=vector(100); q[1]=1; q[2]=2; for(n=3, #q, q[n] = round((n-q[n-1])/q[n-2])); q
(Magma) I:=[1, 2]; [n le 2 select I[n] else Round((n-Self(n-1)) / Self(n-2)):n in [1..90]]; // Marius A. Burtea, Aug 25 2019
CROSSREFS
Cf. A308622.
Sequence in context: A216448 A216763 A112759 * A096862 A029309 A049819
KEYWORD
nonn,look
AUTHOR
Altug Alkan, Aug 25 2019
STATUS
approved