OFFSET
1,2
LINKS
Altug Alkan,Table of n, a(n) for n = 1..10000
Altug Alkan,Plot of a(n)-n/2
MATHEMATICA
a[n_]:= a[n] = If[n <= 2, n, a[n - a[n - 1] + 1] + a[n - a[n - 2] - 1]]; Array[a, 72] (*Michael De Vlieger,May 22 2017 *)
PROG
(PARI) q=vector(10000); q[1]=1; q[2]=2; for(n=3, #q, q[n]=q[n-q[n-1]+1]+q[n-q[n-2]-1]); vector(10000, n, q[n])
(Scheme)
;; An implementation of memoization-macro definec can be found for example in: http://oeis.org/wiki/Memoization
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan,May 22 2017
STATUS
approved