A009759 Expansion of (3 - 21*x + 4*x^2)/((x-1)*(x^2 - 6*x + 1)).
-3, 0, 17, 116, 693, 4056, 23657, 137900, 803757, 4684656, 27304193, 159140516, 927538917, 5406093000, 31509019097, 183648021596, 1070379110493, 6238626641376, 36361380737777, 211929657785300, 1235216565974037
Offset: 0
Keywords
References
- Albert H. Beiler, Recreations in the Theory of Numbers, Dover, New-York, 1964, pp. 122-124.
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (3-21*x+4*x^2)/((x-1)*(x^2-6*x+1))) ) // G. C. Greubel, Feb 12 2018 -
Mathematica
CoefficientList[Series[(3-21x+4x^2)/((x-1)(x^2-6x+1)),{x,0,30}],x] (* or *) LinearRecurrence[{7,-7,1},{-3,0,17},30] (* Harvey P. Dale, Dec 12 2016 *)
-
PARI
my(x='x+O('x^30)); Vec((3-21*x+4*x^2)/((x-1)*(x^2-6*x+1))) \\ G. C. Greubel, Feb 12 2018
-
Sage
((3-21*x+4*x^2)/((x-1)*(x^2-6*x+1))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Apr 04 2019
Formula
a(n) = A001652(n) - 3.
a(n) = ( (1+sqrt(2))^(2*n+1) + (1-sqrt(2))^(2*n+1) - 14 )/4.
a(n) - a(n-1) = A001541(n), n > 0. - R. J. Mathar, Apr 23 2009
a(n) = (Q(2*n+1) -14)/4 = (4*P(n)*P(n+1) + (-1)^n - 7)/2, where P(n) = A000129(n) (Pell) and Q(n) = A002203(n) (Pell-Lucas). - G. C. Greubel, Apr 04 2019
Extensions
G.f. and Binet formula corrected by R. J. Mathar, Aug 24 2016
Comments