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 A081172 #42 Jan 05 2025 19:51:37 %S A081172 1,1,0,2,3,5,10,18,33,61,112,206,379,697,1282,2358,4337,7977,14672, %T A081172 26986,49635,91293,167914,308842,568049,1044805,1921696,3534550, %U A081172 6501051,11957297,21992898,40451246,74401441,136845585,251698272,462945298,851489155 %N A081172 Tribonacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3), with a(0) = 1, a(1) = 1, a(2) = 0. %C A081172 The name "tribonacci number" is less well-defined than "Fibonacci number". The sequence A000073 (which begins 0, 0, 1) is probably the most important version, but the name has also been applied to A000213, A001590, and A081172. - _N. J. A. Sloane_, Jul 25 2024 %C A081172 Completes the set of tribonacci numbers starting with 0's and 1's in the first three terms: %C A081172 0,0,0 A000004; %C A081172 0,0,1 A000073; %C A081172 0,1,0 A001590; %C A081172 0,1,1 A000073 starting at a(1); %C A081172 1,0,0 A000073 starting at a(-1); %C A081172 1,0,1 A001590; %C A081172 1,1,0 this sequence; %C A081172 1,1,1 A000213. %H A081172 Harry J. Smith, <a href="/A081172/b081172.txt">Table of n, a(n) for n = 0..500</a> %H A081172 Martin Burtscher, Igor Szczyrba, RafaĆ Szczyrba, <a href="https://www.emis.de/journals/JIS/VOL18/Szczyrba/sz3.html">Analytic Representations of the n-anacci Constants and Generalizations Thereof</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5. %H A081172 N. G. Voll, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Papers1/51-3/Voll4-TermRecurrence.pdf">Some identities for four term recurrence relations</a>, Fib. Quart., 51 (2013), 268-273. %H A081172 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,1). %F A081172 From _R. J. Mathar_, Mar 27 2009: (Start) %F A081172 G.f.: (1-2*x^2)/(1 - x - x^2 - x^3). %F A081172 a(n) = A000073(n+2) - 2*A000073(n). (End) %p A081172 A081172 := proc(n) %p A081172 option remember; %p A081172 if n <= 2 then %p A081172 op(n+1,[1,1,0]) ; %p A081172 else %p A081172 add(procname(n-i),i=1..3) ; %p A081172 end if; %p A081172 end proc: # _R. J. Mathar_, Aug 09 2012 %t A081172 LinearRecurrence[{1,1,1}, {1,1,0}, 40] (* _Vladimir Joseph Stephan Orlovsky_, Jun 07 2011 *) %o A081172 (PARI) { a1=1; a2=1; a3=0; write("b081172.txt",0," ",a1); write("b081172.txt",1," ",a2); write("b081172.txt",2," ",a3); for(n=3,500, a=a1+a2+a3; a1=a2; a2=a3; a3=a; write("b081172.txt",n," ",a) ) } \\ _Harry J. Smith_, Mar 20 2009 %o A081172 (PARI) my(x='x+O('x^40)); Vec((1-2*x^2)/(1-x-x^2-x^3)) \\ _G. C. Greubel_, Apr 23 2019 %o A081172 (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-2*x^2)/(1-x-x^2-x^3) )); // _G. C. Greubel_, Apr 23 2019 %o A081172 (Sage) ((1-2*x^2)/(1-x-x^2-x^3)).series(x, 40).coefficients(x, sparse=False) # _G. C. Greubel_, Apr 23 2019 %o A081172 (GAP) a:=[1,1,0];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # _G. C. Greubel_, Apr 23 2019 %Y A081172 Cf. A000004, A000073, A000213, A001590, A020992. %K A081172 nonn,easy %O A081172 0,4 %A A081172 _Harry J. Smith_, Apr 19 2003