Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #24 Sep 08 2022 08:46:07
%S 1,2,3,4,6,6,5,6,7,8,10,10,9,10,12,12,12,12,10,12,17,16,15,16,14,16,
%T 19,20,20,18,20,20,18,22,24,22,19,24,24,24,28,24,22,24,27,32,26,28,31,
%U 28,26,32,35,32,32,32,30,32,39,40,36,34,35,34,38,40,40,42,40,38,40,40,36,44,48,42,48,44,40,46,46,46,41,48,48,48,56,48,46,48,51,48
%N a(n) = n for 1 <= n <= 4; thereafter a(n) = a(n - a(n-2)) + a(n - a(n-4)).
%C Conjectured to be infinite.
%D D. R. Hofstadter, Curious patterns and non-patterns in a family of meta-Fibonacci recursions, Lecture in Doron Zeilberger's Experimental Mathematics Seminar, Rutgers University, April 10 2014.
%H N. J. A. Sloane, <a href="/A240809/b240809.txt">Table of n, a(n) for n = 1..20000</a>
%H D. R. Hofstadter, Curious patterns and non-patterns in a family of meta-Fibonacci recursions, Lecture in Doron Zeilberger's Experimental Mathematics Seminar, Rutgers University, April 10 2014; <a href="https://vimeo.com/91708646">Part 1</a>, <a href="https://vimeo.com/91710600">Part 2</a>.
%H D. R. Hofstadter, <a href="/A240809/a240809.pdf">Plot of first 100000 terms</a>
%H <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a>
%p # Q(r,s) with initial values 1,2,3,4,...
%p r:=2; s:=4;
%p a:=proc(n) option remember; global r,s;
%p if n <= s then n
%p else
%p if (a(n-r) <= n) and (a(n-s) <= n) then
%p a(n-a(n-r))+a(n-a(n-s));
%p else lprint("died with n =",n); return (-1);
%p fi;
%p fi; end;
%p [seq(a(n),n=1..100)];
%o (Magma) I:=[1, 2, 3, 4]; [n le 4 select I[n] else Self(n-Self(n-2))+Self(n-Self(n-4)): n in [1..100]]; // _Vincenzo Librandi_, Apr 16 2014
%Y Cf. A240821.
%K nonn
%O 1,2
%A _N. J. A. Sloane_, Apr 15 2014, Apr 17 2014