login
a(n) = (A046717(n))^2 (starting with n=1).
2

%I #27 May 04 2023 03:29:41

%S 1,25,169,1681,14641,133225,1194649,10764961,96845281,871725625,

%T 7845176329,70607649841,635465659921,5719200505225,51472775849209,

%U 463255068736321,4169295360346561,37523659017960025,337712928837117289,3039416366507624401,27354747277647913201

%N a(n) = (A046717(n))^2 (starting with n=1).

%C Characteristic polynomial is x^4 - 4*x^3 - 42*x^2 - 36*x + 81.

%C a(n)/a(n-1) tends to 9.

%C Square root of M = the 4 X 4 matrix: [1/u, 1, u, 1; 1, 1/u, 1, u; u, 1, 1/u, 1; 1, u, 1, 1/u]; where u, 1/u and 1 are the cyclotomic third roots of Unity: (-1, + sqrt(3)i)/2, (-1, -sqrt(3)i)/2 and 1.

%H Colin Barker, <a href="/A120096/b120096.txt">Table of n, a(n) for n = 1..1000</a>

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

%F a(n) = leftmost term in M^n * [1,0,0,0] where M is the 4 X 4 matrix: [1,-2,4,-2; -2,1,-2,4; 4,-2,1,-2; -2,4,-2,1].

%F From _R. J. Mathar_, Sep 09 2008: (Start)

%F G.f.: x*(1+18*x-27*x^2) / ((1-x)*(1-9*x)*(1+3*x)).

%F a(n) = 7*a(n-1) + 21*a(n-2) - 27*a(n-3).

%F (End)

%F a(n) = (1 + 2*(-3)^n + 9^n) / 4. - _Colin Barker_, Dec 23 2017

%e a(4) = 1681 = 41^2 = the square of A046717(4).

%e a(4) = 1681 since M^4 * [1,0,0,0] = [1681, -1640, 1600, -1640].

%t Rest@ Nest[Append[#, 2 #[[-1]] + 3 #[[-2]]] &, {1, 1}, 20]^2 (* or *)

%t Rest@ CoefficientList[Series[x (1 +18x -27x^2)/((1-x)(1-9x)(1+3x)), {x, 0, 21}], x] (* or *)

%t LinearRecurrence[{7, 21, -27}, {1, 25, 169}, 21] (* _Michael De Vlieger_, Dec 22 2017 *)

%t ((1+(-3)^Range[40])/2)^2 (* _G. C. Greubel_, May 03 2023 *)

%o (PARI) Vec(x*(1+18*x-27*x^2) / ((1-x)*(1-9*x)*(1+3*x)) + O(x^40)) \\ _Colin Barker_, Dec 23 2017

%o (Magma) [(1 + (-3)^n)^2/4: n in [1..40]]; // _G. C. Greubel_, May 03 2023

%o (SageMath) [int((1+(-3)^n)/2)^2 for n in range(1,41)] # _G. C. Greubel_, May 03 2023

%Y Cf. A046717.

%K nonn,easy

%O 1,2

%A _Gary W. Adamson_, Jun 08 2006

%E More terms from _Michael De Vlieger_, Dec 22 2017