login
A296421
a(1) = 1, a(2) = 2, a(3) = 3, a(4) = a(5) = 4, a(6) = a(7) = 6; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 7.
2
1, 2, 3, 4, 4, 6, 6, 8, 7, 9, 9, 10, 11, 11, 12, 12, 14, 16, 13, 16, 16, 19, 16, 20, 17, 22, 19, 22, 21, 24, 22, 26, 22, 28, 24, 29, 26, 28, 29, 30, 30, 31, 32, 32, 33, 33, 34, 35, 35, 36, 36, 38, 40, 39, 38, 42, 41, 42, 44, 41, 43, 45, 51, 40, 44, 53, 46, 51, 44, 55, 47, 53, 54, 51, 55
OFFSET
1,2
MATHEMATICA
Fold[Append[#1, #1[[#2 - #1[[#2 - 1]] ]] + #1[[#2 - #1[[#2 - 2]] ]] + #1[[#2 - #1[[#2 - 3]] ]] ] &, {1, 2, 3, 4, 4, 6, 6}, Range[8, 75]] (* Michael De Vlieger, Dec 12 2017 *)
PROG
(PARI) q=vector(10^5); q[1]=1; q[2]=2; q[3]=3; q[4]=4; q[5]=4; q[6]=6; q[7]=6; for(n=8, #q, q[n] = q[n-q[n-1]]+q[n-q[n-2]]+q[n-q[n-3]]); q
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Altug Alkan, Dec 12 2017
STATUS
approved