OFFSET
1,2
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
Altug Alkan, Line graph of a(n)-n/2
MATHEMATICA
a[1] = 1; a[2] = a[3] = a[4] = 2; a[n_] := a[n] = a[a[n - 1]] + a[n - a[n - 1]]; Array[a, 74] (* Michael De Vlieger, May 20 2017 *)
PROG
(PARI) q=vector(10000); q[1]=1; q[2]=q[3]=q[4]=2; for(n=5, #q, q[n]=q[q[n-1]]+q[n-q[n-1]]); vector(10000, n, q[n])
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, May 20 2017
STATUS
approved