%I#37 2023年12月31日11:35:09
%S 1,2,1,5,-2,17,-23,74,-143365,-7941889,-42719938,-2275152565,
%电话:-120818278513,-6409671476506,-33994077828925,-1802714641513921,
%电话:95595359220137122,506923191167334565
%N a(N)=-a(N-1)+3*a(N-2),起始a(1)=1,a(2)=2。
%C三角形A140166的行和。
%C等于三角形的本征序列A112555_Gary W.Adamson,2009年1月30日
%H G.C.Greubel,n表,n=1..1000时的a(n)</a>
%H<a href=“/index/Rec#order_02”>带常系数的线性递归索引条目,签名(-1,3)。
%F a(n)=X^n的项(1,1),其中X=2X2矩阵[1,-1;-1,-2]。
%F G.F.:x*(1+3*x)/(1+x-3*x^2)_Philippe Deléham,2011年12月18日
%F a(n)=-(3*A140167(n-1)+A140167_R.J.Mathar_,2013年4月22日
%F a(n)=(-sqrt(3)_G.C.Greubel,2019年12月26日
%例如:(1/13)*exp(-x/2)*(13*cosh(sqrt(13)*x/2)+5*sqrt_Stefano Spezia,2020年1月2日
%e a(6)=17=(-1)*a(5)+3*a(4)=(-1)*(-2)+3*5。
%e a(4)=5=X^5的项(1,1),其中X^5=[5,7;7,26]。
%p序列(系数(级数(x*(1+3*x)/(1+x-3*x^2),x,n+1),x、n),n=1..30);#_G.C.Greubel,2019年12月26日
%t表[圆[(-Sqrt[3])^n*(LucasL[n,1/Sqrt[3]]-5*Fibonacci[n,1/1Sqrt[3]/Sqrt[3]])/2],{n,0,30}](*_G.C.Greubel_,2019年12月26日*)
%o(PARI)我的(x='x+o('x^30));Vec(x*(1+3*x)/(1+x-3*x^2))\\_G.C.Greubel_,2019年12月26日
%o(Magma)R<x>:=PowerSeriesRing(整数(),30);系数(R!(x*(1+3*x)/(1+x-3*x^2));//_G.C.Greubel,2019年12月26日
%o(岩浆)a:=[1,2];[n le 2在[1..30]]中选择一个[n]else-Self(n-1)+3*Self[n-2):n;//_Marius A.Burtea,2020年1月2日
%o(圣人)
%o定义A140165_list(prec):
%o P.<x>=PowerSeriesRing(ZZ,prec)
%o返回P(x*(1+3*x)/(1+x-3*x^2)).list()
%o a=A140165_列表(30);a[1:]#_G.C.Greubel_,2019年12月26日
%o(间隙)a:=[1,2];;对于[3..30]中的n,执行a[n]:=-a[n-1]+3*a[n-2];od;a、 #个_G.C.Greubel,2019年12月26日
%Y参考A140166、A140167、A112555。
%K符号,简单
%O 1,2号机组
%A _加里·W·亚当森,2008年5月10日
|