login
A304622
a(n) = 11 - n for 1 <= n <= 10. Thereafter a(n) = a(n-a(n-2)) + a(n-a(n-4)).
0
10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 6, 8, 10, 15, 8, 13, 6, 14, 16, 9, 14, 13, 6, 14, 22, 18, 20, 16, 6, 23, 28, 15, 26, 22, 6, 29, 34, 15, 32, 28, 6, 35, 40, 15, 38, 34, 6, 41, 46, 15, 44, 40, 6, 47, 52, 15, 50, 46, 6, 53, 58, 15, 56, 52, 6, 59, 64, 15, 62, 58, 6, 65, 70, 15, 68, 64, 6, 71
OFFSET
1,1
FORMULA
a(6*k-3) = 6*(k-1)-4, a(6*k-2) = 6*(k-2)-2, a(6*k-1) = 6, a(6*k) = 6*(k-1)-1, a(6*k+1) = 6*k-2, a(6*k+2) = 15 for k > 4.
MAPLE
f:= proc(n) option remember; procname(n-procname(n-2))+procname(n-procname(n-4)) end proc:
for i from 1 to 10 do f(i):= 11-i od:
map(f, [$1..100]); # Robert Israel, May 16 2018
PROG
(PARI) q=vector(10^5); for(n=1, 10, q[n]=10-n+1); for(n=11, #q, q[n]=q[n-q[n-2]]+ q[n-q[n-4]]); q
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, May 15 2018
STATUS
approved