OFFSET
1,1
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) option remember; procname(n-procname(n-3))+procname(n-procname(n-6)) end proc:
for i from 1 to 9 do f(i):= 10-i od:
map(f, [$1..100]); # Robert Israel, May 16 2018
MATHEMATICA
Nest[Append[#, #[[1 + Length@ # - #[[-3]] ]] + #[[1 + Length@ # - #[[-6]] ]] ] &, Range[9, 1, -1], 77] (* Michael De Vlieger, May 20 2018 *)
PROG
(PARI) q=vector(10^5); for(n=1, 9, q[n]=9-n+1); for(n=10, #q, q[n]=q[n-q[n-3]]+ q[n-q[n-6]]); q
(Magma) [n le 9 select 10-n else Self(n-Self(n-3))+Self(n-Self(n-6)): n in [1..80]]; // Vincenzo Librandi, May 20 2018
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Altug Alkan, May 15 2018
STATUS
approved