G. C. Greubel, <a href="/A192421/b192421_1.txt">Table of n, a(n) for n = 0..1000</a>
G. C. Greubel, <a href="/A192421/b192421_1.txt">Table of n, a(n) for n = 0..1000</a>
reviewed
approved
proposed
reviewed
editing
proposed
editing
proposed
Constant term of the reduction by x^2 -> x+1 of the polynomial p(n,x) defined below in Comments.
The polynomial p(n,x) is defined by ((x+d)/2)^n + ((x-d)/2)^n, where d = sqrt(x^2+4). For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232.
G. C. Greubel, <a href="/A192421/b192421_1.txt">Table of n, a(n) for n = 0..1000</a>
<a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-1,-1).
From Colin Barker, May 12 2014: (Start)
Conjecture: a(n) = a(n-1) + 3*a(n-2) - a(n-3) - a(n-4). G.f.: -(3*x^2+2*x-2) / (x^4+x^3-3*x^2-x+1). - _Colin Barker_, May 12 2014
G.f.: (2-2*x-3*x^2)/(1-x-3*x^2+x^3+x^4). (End)
a(n) = Sum_{j=0..n} T(n, j)*Fibonacci(j-1), where T(n, k) = [x^k] ((x + sqrt(x^2+4))^n + (x - sqrt(x^2+4))^n)/2^n. - G. C. Greubel, Jul 11 2023
q[x_] := x + 1; d = Sqrt[x^2 + 4];
p[n_, x_] := ((x + d)/2)^n + ((x - d)/2)^n (* A162514 *)
reductionRules = {x^y_?EvenQ -> q[x]^(y/2), x^y_?OddQ -> x *q[x]^((y - 1)/2)};
Table[Coefficient[Part[t, n], x, 0], {n, 1, 30}] (* A192421 *)
Table[Coefficient[Part[t, n], x, 1], {n, 1, 30}] (* A192422 *)
LinearRecurrence[{1, 3, -1, -1}, {2, 0, 3, 1}, 40] (* G. C. Greubel, Jul 11 2023 *)
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-2*x-3*x^2)/(1-x-3*x^2+x^3+x^4) )); // G. C. Greubel, Jul 11 2023
(SageMath)
@CachedFunction
def a(n): # a = A192421
if (n<4): return (2, 0, 3, 1)[n]
else: return a(n-1) +3*a(n-2) -a(n-3) -a(n-4)
[a(n) for n in range(41)] # G. C. Greubel, Jul 11 2023
approved
editing
proposed
approved
editing
proposed