cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A240809 a(n) = n for 1 <= n <= 4; thereafter a(n) = a(n - a(n-2)) + a(n - a(n-4)).

This page as a plain text file.
%I A240809 #24 Sep 08 2022 08:46:07
%S A240809 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 A240809 19,20,20,18,20,20,18,22,24,22,19,24,24,24,28,24,22,24,27,32,26,28,31,
%U A240809 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 A240809 a(n) = n for 1 <= n <= 4; thereafter a(n) = a(n - a(n-2)) + a(n - a(n-4)).
%C A240809 Conjectured to be infinite.
%D A240809 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 A240809 N. J. A. Sloane, <a href="/A240809/b240809.txt">Table of n, a(n) for n = 1..20000</a>
%H A240809 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 A240809 D. R. Hofstadter, <a href="/A240809/a240809.pdf">Plot of first 100000 terms</a>
%H A240809 <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a>
%p A240809 # Q(r,s) with initial values 1,2,3,4,...
%p A240809 r:=2; s:=4;
%p A240809 a:=proc(n) option remember; global r,s;
%p A240809 if n <= s then n
%p A240809 else
%p A240809     if (a(n-r) <= n) and (a(n-s) <= n) then
%p A240809     a(n-a(n-r))+a(n-a(n-s));
%p A240809     else lprint("died with n =",n); return (-1);
%p A240809     fi;
%p A240809 fi; end;
%p A240809 [seq(a(n),n=1..100)];
%o A240809 (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 A240809 Cf. A240821.
%K A240809 nonn
%O A240809 1,2
%A A240809 _N. J. A. Sloane_, Apr 15 2014, Apr 17 2014