A167373 Expansion of (1+x)*(3*x+1)/(1+x+x^2).
1, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1
Offset: 0
References
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972, Chapter 22.
Links
- Index entries for linear recurrences with constant coefficients, signature (-1,-1).
Programs
-
Maple
A167373 := proc(n) option remember; if n < 4 then op(n+1,[1,3,-1,-2]) ; else procname(n-3) ; end if; end proc: seq(A167373(n),n=0..20) ; # R. J. Mathar, Feb 06 2020
-
Mathematica
CoefficientList[Series[(1 + x)*(3*x + 1)/(1 + x + x^2), {x, 0, 50}], x] (* G. C. Greubel, Jun 12 2016 *) LinearRecurrence[{-1,-1},{1,3,-1},120] (* Harvey P. Dale, Apr 05 2023 *)
Formula
G.f.: (1+x)*(3*x+1)/(1+x+x^2).
a(n) = a(n-3), n>4.
a(n) = - a(n-1) - a(n-2) for n>2.
a(n) = 4*sin(2*n*Pi/3)/sqrt(3)-2*cos(2*n*Pi/3) for n>0 with a(0)=1. - Wesley Ivan Hurt, Jun 12 2016
Extensions
Edited by R. J. Mathar, Nov 03 2009
Further edited and extended by Simon Plouffe, Nov 23 2009
Recomputed by N. J. A. Sloane, Dec 20 2009
Comments