login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(1) = 3, a(2) = 1, a(3) = 4, a(4) = 2, a(5) = 5; a(6) = 3; a(n) = a(n-a(n-1)) + a(n-a(n-4)) for n > 6.
3

%I #15 Sep 08 2022 08:46:21

%S 3,1,4,2,5,3,6,4,7,10,8,6,9,7,10,13,6,14,12,10,18,6,14,17,10,23,11,14,

%T 22,10,28,16,14,27,10,33,16,14,32,10,38,16,19,37,10,43,16,24,42,10,48,

%U 16,24,47,10,53,16,24,52,10,58,16,24,57,10,63,21,24,62,10,68,26,24,67,10

%N a(1) = 3, a(2) = 1, a(3) = 4, a(4) = 2, a(5) = 5; a(6) = 3; a(n) = a(n-a(n-1)) + a(n-a(n-4)) for n > 6.

%C A well-defined quasi-periodic solution for Hofstadter V recurrence (a(n) = a(n-a(n-1)) + a(n-a(n-4))).

%H Michael De Vlieger, <a href="/A309636/b309636.txt">Table of n, a(n) for n = 1..10006</a>

%H Altug Alkan, Nathan Fox, Orhan Ozgur Aybar, Zehra Akdeniz, <a href="https://arxiv.org/abs/2002.03396">On Some Solutions to Hofstadter's V-Recurrence</a>, arXiv:2002.03396 [math.DS], 2020.

%F For k > 1:

%F a(5*k) = 10,

%F a(5*k+1) = 5*k-2,

%F a(5*k+2) = 5*(floor((sqrt(2*k-1)-1)/2) + floor((sqrt(2*k-3)-1)/2)) + 6,

%F a(5*k+3) = 5*(floor(sqrt(k/2)) + floor(sqrt((k-1)/2))) + 4,

%F a(5*k+4) = 5*k-3.

%F Also, a(5*k+2) = 5*f(k)+1 and a(5*k+3) = 5*g(k)-1 where f(k) = g(k-g(k-1)) and g(k) = f(k-f(k))+2 with f(1) = g(1) = 1, g(2) = 2.

%t Nest[Append[#, #[[-#[[-1]] ]] + #[[-#[[-4]] ]]] &, {3, 1, 4, 2, 5, 3}, 69] (* _Michael De Vlieger_, May 08 2020 *)

%o (PARI) q=vector(100); q[1]=3; q[2]=1; q[3]=4; q[4]=2; q[5]=5; q[6]=3; for(n=7, #q, q[n] = q[n-q[n-1]] + q[n-q[n-4]]); q

%o (Magma) I:=[3,1,4,2,5,3]; [n le 6 select I[n] else Self(n-Self(n-1)) + Self(n-Self(n-4)): n in [1..80]]; // _Marius A. Burtea_, Aug 11 2019

%Y Cf. A063882, A244477, A296518, A309492, A309494, A309496, A309554, A309567.

%K nonn,easy

%O 1,1

%A _Altug Alkan_ and _Nathan Fox_, Aug 10 2019