login
A309704
a(1) = 3, a(2) = 4, a(3) = 5, a(4) = 4, a(5) = 5; a(6) = 6; a(n) = a(n-a(n-1)) + a(n-a(n-4)) for n > 6.
1
3, 4, 5, 4, 5, 6, 7, 7, 8, 8, 9, 10, 10, 10, 11, 11, 13, 12, 14, 14, 14, 15, 15, 16, 17, 17, 18, 18, 19, 19, 20, 20, 20, 21, 21, 22, 24, 23, 23, 25, 24, 26, 27, 27, 26, 28, 28, 28, 29, 29, 30, 31, 31, 32, 32, 33, 33, 34, 35, 35, 35, 36, 36, 37, 37, 38, 39, 39, 39, 40, 40, 40, 41, 41, 42, 43, 43, 45, 45, 45, 45, 48, 44, 48, 49, 47, 52, 47, 51, 50, 47, 52, 50, 54, 52, 54, 55, 54, 54, 56
OFFSET
1,1
COMMENTS
This sequence is finite but has an exceptionally long life: a(3080193026) = 3101399868 is its last term since a(3080193027) refers to a nonpositive index and thus fails to exist. See plots in Links section to fractal-like structure of a(n)-n/2.
LINKS
Altug Alkan, Nathan Fox, Orhan Ozgur Aybar, Zehra Akdeniz, On Some Solutions to Hofstadter's V-Recurrence, arXiv:2002.03396 [math.DS], 2020.
MATHEMATICA
Nest[Append[#, #[[-#[[-1]] ]] + #[[-#[[-4]] ]]] &, {3, 4, 5, 4, 5, 6}, 94] (* Michael De Vlieger, May 08 2020 *)
PROG
(PARI) q=vector(100); q[1]=3; q[2]=4; q[3]=5; q[4]=4; q[5]=5; q[6]=6; for(n=7, #q, q[n] = q[n-q[n-1]] + q[n-q[n-4]]); q
CROSSREFS
KEYWORD
nonn,look,fini
AUTHOR
Altug Alkan and Rémy Sigrist, Aug 13 2019
EXTENSIONS
a(3080193026) from Giovanni Resta, Aug 13 2019
STATUS
approved