login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A214899 a(n) = a(n-1) + a(n-2) + a(n-3) with a(0)=2, a(1)=1, a(2)=2. 52

%I #30 Sep 08 2022 08:46:02

%S 2,1,2,5,8,15,28,51,94,173,318,585,1076,1979,3640,6695,12314,22649,

%T 41658,76621,140928,259207,476756,876891,1612854,2966501,5456246,

%U 10035601,18458348,33950195,62444144,114852687,211247026,388543857

%N a(n) = a(n-1) + a(n-2) + a(n-3) with a(0)=2, a(1)=1, a(2)=2.

%C With offset of 5 this sequence is the 4th row of the tribonacci array A136175.

%H G. C. Greubel, <a href="/A214899/b214899.txt">Table of n, a(n) for n = 0..1000</a> (terms 0..200 from Robert Price)

%H 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 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,1).

%F G.f.: (2-x-x^2)/(1-x-x^2-x^3).

%F a(n) = K(n) - T(n+1) + T(n), where K(n) = A001644(n), T(n) = A000073(n+1). - _G. C. Greubel_, Apr 23 2019

%t LinearRecurrence[{1,1,1},{2,1,2},34] (* _Ray Chandler_, Dec 08 2013 *)

%o (PARI) a(n)=([0,1,0;0,0,1;1,1,1]^n*[2;1;2])[1,1] \\ _Charles R Greathouse IV_, Jun 11 2015

%o (PARI) my(x='x+O('x^40)); Vec((2-x-x^2)/(1-x-x^2-x^3)) \\ _G. C. Greubel_, Apr 23 2019

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-x-x^2)/(1-x-x^2-x^3) )); // _G. C. Greubel_, Apr 23 2019

%o (Sage) ((2-x-x^2)/(1-x-x^2-x^3)).series(x, 40).coefficients(x, sparse=False) # _G. C. Greubel_, Apr 23 2019

%o (GAP) a:=[2,1,2];; 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 Cf. A000073, A000213, A035513, A136175, A141036, A141523.

%K nonn,easy

%O 0,1

%A _Abel Amene_, Jul 29 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 02:01 EDT 2024. Contains 371798 sequences. (Running on oeis4.)