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, Table of n, a(n) for n = 1..20000
Altug Alkan, Nathan Fox, Orhan Ozgur Aybar, Zehra Akdeniz, On Some Solutions to Hofstadter's V-Recurrence, arXiv:2002.03396 [math.DS], 2020.
Rémy Sigrist, Density plot of a(n)-n/2 for n <= 10^8
Rémy Sigrist, Scatterplot of a(n)-n/2 for n <= 10^8
Rémy Sigrist, Density plot of the whole sequence (n = 1..3080193026)
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
AUTHOR
Altug Alkan and Rémy Sigrist, Aug 13 2019
EXTENSIONS
a(3080193026) from Giovanni Resta, Aug 13 2019
STATUS
approved