login
Expansion of (3 - 21*x + 4*x^2)/((x-1)*(x^2 - 6*x + 1)).
1

%I #41 Sep 08 2022 08:44:37

%S -3,0,17,116,693,4056,23657,137900,803757,4684656,27304193,159140516,

%T 927538917,5406093000,31509019097,183648021596,1070379110493,

%U 6238626641376,36361380737777,211929657785300,1235216565974037

%N Expansion of (3 - 21*x + 4*x^2)/((x-1)*(x^2 - 6*x + 1)).

%C Numbers k such that 2*k^2 + 14*k + 25 is a square. - _James R. Buddenhagen_, Jul 19 2008

%C If k satisfies the previous condition, i.e., P(k) = 2*k^2 + 14*k + 25 is a square, then there exists an integer m such that (k+3)^2 + (k+4)^2 = m^2; finding such numbers k is equivalent to finding Pythagorean triples (X,X+1,Z) with X in A001652 (1st formula). For k >= 0, P(k) = A001844(k+3), and the successive values of P(k) that are squares are in A008844. - _Bernard Schott_, Mar 24 2019

%D Albert H. Beiler, Recreations in the Theory of Numbers, Dover, New-York, 1964, pp. 122-124.

%H G. C. Greubel, <a href="/A009759/b009759.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(n) = A001652(n) - 3.

%F a(n) = ( (1+sqrt(2))^(2*n+1) + (1-sqrt(2))^(2*n+1) - 14 )/4.

%F a(n) - a(n-1) = A001541(n), n > 0. - _R. J. Mathar_, Apr 23 2009

%F 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

%t 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 *)

%o (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

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (3-21*x+4*x^2)/((x-1)*(x^2-6*x+1))) ) // _G. C. Greubel_, Feb 12 2018

%o (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

%Y Cf. A001652 (X values), A001653 (Z values), A001844, A008844.

%K sign

%O 0,1

%A _N. J. A. Sloane_, Nick Baxter (nick(AT)visigenic.com)

%E G.f. and Binet formula corrected by _R. J. Mathar_, Aug 24 2016