This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A120096 #27 May 04 2023 03:29:41 %S A120096 1,25,169,1681,14641,133225,1194649,10764961,96845281,871725625, %T A120096 7845176329,70607649841,635465659921,5719200505225,51472775849209, %U A120096 463255068736321,4169295360346561,37523659017960025,337712928837117289,3039416366507624401,27354747277647913201 %N A120096 a(n) = (A046717(n))^2 (starting with n=1). %C A120096 Characteristic polynomial is x^4 - 4*x^3 - 42*x^2 - 36*x + 81. %C A120096 a(n)/a(n-1) tends to 9. %C A120096 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 A120096 Colin Barker, <a href="/A120096/b120096.txt">Table of n, a(n) for n = 1..1000</a> %H A120096 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,21,-27). %F A120096 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 A120096 From _R. J. Mathar_, Sep 09 2008: (Start) %F A120096 G.f.: x*(1+18*x-27*x^2) / ((1-x)*(1-9*x)*(1+3*x)). %F A120096 a(n) = 7*a(n-1) + 21*a(n-2) - 27*a(n-3). %F A120096 (End) %F A120096 a(n) = (1 + 2*(-3)^n + 9^n) / 4. - _Colin Barker_, Dec 23 2017 %e A120096 a(4) = 1681 = 41^2 = the square of A046717(4). %e A120096 a(4) = 1681 since M^4 * [1,0,0,0] = [1681, -1640, 1600, -1640]. %t A120096 Rest@ Nest[Append[#, 2 #[[-1]] + 3 #[[-2]]] &, {1, 1}, 20]^2 (* or *) %t A120096 Rest@ CoefficientList[Series[x (1 +18x -27x^2)/((1-x)(1-9x)(1+3x)), {x, 0, 21}], x] (* or *) %t A120096 LinearRecurrence[{7, 21, -27}, {1, 25, 169}, 21] (* _Michael De Vlieger_, Dec 22 2017 *) %t A120096 ((1+(-3)^Range[40])/2)^2 (* _G. C. Greubel_, May 03 2023 *) %o A120096 (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 A120096 (Magma) [(1 + (-3)^n)^2/4: n in [1..40]]; // _G. C. Greubel_, May 03 2023 %o A120096 (SageMath) [int((1+(-3)^n)/2)^2 for n in range(1,41)] # _G. C. Greubel_, May 03 2023 %Y A120096 Cf. A046717. %K A120096 nonn,easy %O A120096 1,2 %A A120096 _Gary W. Adamson_, Jun 08 2006 %E A120096 More terms from _Michael De Vlieger_, Dec 22 2017