OFFSET
1,1
COMMENTS
A well-defined quasi-periodic solution for recurrence (a(n) = a(n-a(n-2)) + a(n-a(n-3))).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Altug Alkan, Nathan Fox, Orhan Ozgur Aybar, Zehra Akdeniz, On Some Solutions to Hofstadter's V-Recurrence, arXiv:2002.03396 [math.DS], 2020.
FORMULA
For k >= 1:
a(5*k) = 5,
a(5*k+1) = 5*floor(sqrt(k)+1/2)-2,
a(5*k+2) = 5*k+1,
a(5*k+3) = 5*k+4,
a(5*k+4) = 5*floor(sqrt(k))+2.
MATHEMATICA
Nest[Append[#, #[[-#[[-2]] ]] + #[[-#[[-3]] ]]] &, {3, 1, 4, 2}, 81] (* Michael De Vlieger, May 08 2020 *)
PROG
(PARI) q=vector(100); q[1]=3; q[2]=1; q[3]=4; q[4]=2; for(n=5, #q, q[n] = q[n-q[n-2]] + q[n-q[n-3]]); q
(Magma) I:=[3, 1, 4, 2]; [n le 4 select I[n] else Self(n-Self(n-2)) + Self(n-Self(n-3)): n in [1..90]]; // Marius A. Burtea, Aug 11 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan and Nathan Fox, Aug 11 2019
STATUS
approved