login
A283422
a(1) = a(2) = a(4) = 1; a(3) = 0; a(n) = a(n-a(n-1)-1) + a(n-a(n-2)-4) for n > 4.
1
1, 1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 7, 6, 7, 7, 8, 9, 9, 9, 9, 10, 10, 12, 10, 12, 13, 11, 13, 14, 13, 15, 15, 16, 16, 16, 17, 18, 18, 18, 19, 19, 19, 21, 20, 19, 23, 22, 22, 25, 20, 23, 26, 26, 21, 28, 26, 25, 28, 26, 29, 30, 29, 30, 31, 31, 31, 31, 33, 32, 34, 33
OFFSET
1,6
MATHEMATICA
a[1] = a[2] = a[4] = 1; a[3] = 0; a[n_] := a[n] = a[n - a[n - 1] - 1] + a[n - a[n - 2] - 4]; Array[a, 78] (* Michael De Vlieger, May 15 2017 *)
PROG
(PARI) q=vector(10000); q[1]=q[2]=q[4]=1; q[3]=0; for(n=5, #q, q[n]=q[n-1-q[n-1]]+q[n-4-q[n-2]]); vector(10000, n, q[n])
CROSSREFS
Cf. A005185.
Sequence in context: A120203 A029280 A060971 * A364185 A091946 A094996
KEYWORD
nonn,look
AUTHOR
Altug Alkan, May 14 2017
STATUS
approved