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.
%I A005707 M0251 #27 Oct 12 2017 19:08:19 %S A005707 1,1,1,1,2,2,3,3,3,4,4,4,4,5,6,6,6,6,6,7,8,8,9,9,9,9,9,9,10,11,11,12, %T A005707 12,12,13,13,13,13,13,13,13,14,15,16,16,17,17,17,18,18,18,18,19,19,19, %U A005707 19,19,19,19,19,20,21,22,22,23,24,24,25,25,25,26,26,26,26,27,27,27,27,27 %N A005707 a(1) = a(2) = a(3) = a(4) = 1, a(n) = a(a(n-1))+a(n-a(n-1)) for n >= 5. %C A005707 It is known that a(n)-a(n-1)=0 or 1 (see the 1991 Monthly reference). - _Emeric Deutsch_, Jun 06 2005 %D A005707 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A005707 T. D. Noe, <a href="/A005707/b005707.txt">Table of n, a(n) for n=1..1000</a> %H A005707 D. Kleitman, <a href="http://www.jstor.org/stable/2324158">Solution to Problem E3274</a>, Amer. Math. Monthly, 98 (1991), 958-959. %H A005707 R. K. Guy, <a href="/A004001/a004001_2.pdf">Letter to N. J. A. Sloane with attachment, 1988</a> %H A005707 R. K. Guy and N. J. A. Sloane, <a href="/A005180/a005180.pdf">Correspondence</a>, 1988. %H A005707 D. Newman, <a href="http://www.jstor.org/stable/2322766">Problem E3274</a>, Amer. Math. Monthly, 95 (1988), 555. %p A005707 a[1]:=1: a[2]:=1: a[3]:=1: a[4]:=1: for n from 5 to 100 do a[n]:=a[a[n-1]]+a[n-a[n-1]] od: seq(a[n],n=1..100); # _Emeric Deutsch_, Jun 06 2005 %t A005707 a[1]=a[2]=a[3]=a[4]=1;a[n_]:=a[n]=a[a[n-1]]+a[n-a[n-1]];Table[a[i],{i,80}] (* _Harvey P. Dale_, Jan 22 2013 *) %o A005707 (Haskell) %o A005707 a005707 n = a005707_list !! (n-1) %o A005707 a005707_list = 1 : 1 : 1 : 1 : h 5 1 where %o A005707 h x y = z : h (x + 1) z where z = a005707 y + a005707 (x - y) %o A005707 -- _Reinhard Zumkeller_, Jul 20 2012 %Y A005707 Cf. A004001, A005350. %Y A005707 Cf. A005185. %K A005707 nonn,easy,nice %O A005707 1,5 %A A005707 _N. J. A. Sloane_ %E A005707 More terms from _Emeric Deutsch_, Jun 06 2005