|
|
A120096
|
|
a(n) = (A046717(n))^2 (starting with n=1).
|
|
2
|
|
|
1, 25, 169, 1681, 14641, 133225, 1194649, 10764961, 96845281, 871725625, 7845176329, 70607649841, 635465659921, 5719200505225, 51472775849209, 463255068736321, 4169295360346561, 37523659017960025, 337712928837117289, 3039416366507624401, 27354747277647913201
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Characteristic polynomial is x^4 - 4*x^3 - 42*x^2 - 36*x + 81.
a(n)/a(n-1) tends to 9.
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.
|
|
LINKS
|
|
|
FORMULA
|
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].
G.f.: x*(1+18*x-27*x^2) / ((1-x)*(1-9*x)*(1+3*x)).
a(n) = 7*a(n-1) + 21*a(n-2) - 27*a(n-3).
(End)
a(n) = (1 + 2*(-3)^n + 9^n) / 4. - Colin Barker, Dec 23 2017
|
|
EXAMPLE
|
a(4) = 1681 = 41^2 = the square of A046717(4).
a(4) = 1681 since M^4 * [1,0,0,0] = [1681, -1640, 1600, -1640].
|
|
MATHEMATICA
|
Rest@ Nest[Append[#, 2 #[[-1]] + 3 #[[-2]]] &, {1, 1}, 20]^2 (* or *)
Rest@ CoefficientList[Series[x (1 +18x -27x^2)/((1-x)(1-9x)(1+3x)), {x, 0, 21}], x] (* or *)
|
|
PROG
|
(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
(Magma) [(1 + (-3)^n)^2/4: n in [1..40]]; // G. C. Greubel, May 03 2023
(SageMath) [int((1+(-3)^n)/2)^2 for n in range(1, 41)] # G. C. Greubel, May 03 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|