login
a(1) = a(2) = a(3) = 1, a(n) = a(n - a(n-1)) + a(n - a(n-3)) for 3 < n < 165.
6

%I #23 Dec 12 2016 07:30:08

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

%T 14,19,15,21,17,18,18,21,19,21,24,20,22,24,20,31,19,30,19,28,19,30,21,

%U 32,21,34,21,36,21,38,21,48,18,53,15,49,18,49,24,61,17,51,19,42

%N a(1) = a(2) = a(3) = 1, a(n) = a(n - a(n-1)) + a(n - a(n-3)) for 3 < n < 165.

%D Sequence proposed by Reg Allenby.

%D Undefined past a(164), since a(164) = 202.

%H N. J. A. Sloane, <a href="/A046700/b046700.txt">Table of n, a(n) for n = 1..164</a> [The full sequence]

%H B. Balamohan, A. Kuznetsov and S. Tanny, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Tanny/tanny3.html">On the behavior of a variant of Hofstadter's Q-sequence</a>, J. Integer Sequences, Vol. 10 (2007), #07.7.1.

%H <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a>

%p V := proc(n) option remember; if n<=3 then 1 else if n > V(n-1) and n > V(n-3) then RETURN(V(n-V(n-1))+V(n-V(n-3))); else ERROR(" died at n= ", n); fi; fi; end;

%t a[1] = a[2] = a[3] = 1; a[n_] := a[n] = a[n - a[n - 1]] + a[n - a[n - 3]]; Array[a, 72] (* _Jean-François Alcover_, Dec 12 2016 *)

%K nonn,fini,full

%O 1,4

%A _R. K. Guy_

%E Edited by _N. J. A. Sloane_, Nov 06 2007