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.

A046702 a(n)=a(n-a(n-1))+a(n-1-a(n-2))+a(n-2-a(n-3)), n>3. a(1)=a(2)=a(3)=1.

This page as a plain text file.
%I A046702 #21 Dec 12 2016 04:54:04
%S A046702 1,1,1,3,3,3,5,5,7,5,7,7,9,9,9,11,11,13,11,15,13,17,13,17,15,19,17,19,
%T A046702 17,21,19,23,19,23,21,25,23,25,25,27,27,27,29,29,31,29,33,31,35,31,37,
%U A046702 33,39,33,41,35,43,35,43,37,45,39,45,39,47,41,49,41,49,43,51,45,51,45
%N A046702 a(n)=a(n-a(n-1))+a(n-1-a(n-2))+a(n-2-a(n-3)), n>3. a(1)=a(2)=a(3)=1.
%D A046702 Sequence proposed by Reg Allenby.
%D A046702 Callaghan, Joseph, John J. Chew III, and Stephen M. Tanny. "On the behavior of a family of meta-Fibonacci sequences." SIAM Journal on Discrete Mathematics 18.4 (2005): 794-824. See T_{0,3} with initial values 1,1,1, as in Fig. 1.6. - _N. J. A. Sloane_, Apr 16 2014
%H A046702 N. J. A. Sloane, <a href="/A046702/b046702.txt">Table of n, a(n) for n = 1..20000</a>
%H A046702 <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a>
%p A046702 #T_s,k(n) from Callaghan et al. Eq. (1.6). - From _N. J. A. Sloane_, Apr 16 2014
%p A046702 s:=0; k:=3;
%p A046702 a:=proc(n) option remember; global s,k;
%p A046702 if n <= 2 then 1
%p A046702 elif n = 3 then 1
%p A046702 else
%p A046702     add(a(n-i-s-a(n-i-1)),i=0..k-1);
%p A046702 fi; end;
%p A046702 t1:=[seq(a(n),n=1..100)];
%t A046702 a[n_] := a[n] = a[n-a[n-1]] + a[n-1-a[n-2]] + a[n-2-a[n-3]]; a[1] = a[2] = a[3] = 1; Array[a, 80] (* _Jean-François Alcover_, Dec 12 2016 *)
%Y A046702 Cf. A240833, A240834.
%Y A046702 Callaghan et al. (2005)'s sequences T_{0,k}(n) for k=1 through 7 are A000012, A046699, A046702, A240835, A241154, A241155, A240830.
%K A046702 nonn,look
%O A046702 1,4
%A A046702 _R. K. Guy_
%E A046702 Corrected and extended by Michael Somos