OFFSET
1,2
COMMENTS
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)^n - (x-d)^n)/(2*d), where d = sqrt(x+3). For an introduction to reductions of polynomials by substitutions such as x^2 -> x+1, see A192232.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,8,-4,-4).
FORMULA
From Colin Barker, Dec 09 2012: (Start)
a(n) = 2*a(n-1) + 8*a(n-2) - 4*a(n-3) - 4*a(n-4).
G.f.: 2*x^2/(1-2*x-8*x^2+4*x^3+4*x^4). (End)
From G. C. Greubel, Jul 10 2023: (Start)
T(n, k) = [x^k] ((x+sqrt(x+3))^n - (x-sqrt(x+3))^n)/(2*sqrt(x+3)).
a(n) = Sum_{k=0..n-1} T(n, k)*Fibonacci(k). (End)
EXAMPLE
The first five polynomials p(n,x) and their reductions are as follows:
p(0, x) = 1 -> 1
p(1, x) = 2*x -> 2*x
p(2, x) = 3 + x + 3*x^2 -> 6 + 4*x
p(3, x) = 12*x + 4*x^2 + 4*x^3 -> 8 + 24*x
p(4, x) = 9 + 6*x + 31*x^2 + 10*x^3 + 5*x^4 -> 60 + 72*x.
MATHEMATICA
(See A192383.)
LinearRecurrence[{2, 8, -4, -4}, {0, 2, 4, 24}, 40] (* G. C. Greubel, Jul 10 2023 *)
PROG
(Magma)
R<x>:=PowerSeriesRing(Integers(), 41);
[0] cat Coefficients(R!( 2*x^2/(1-2*x-8*x^2+4*x^3+4*x^4) )) // G. C. Greubel, Jul 10 2023
(SageMath)
@CachedFunction
def a(n): # a = A192384
if (n<5): return (0, 0, 2, 4, 24)[n]
else: return 2*a(n-1) +8*a(n-2) -4*a(n-3) -4*a(n-4)
[a(n) for n in range(1, 41)] # G. C. Greubel, Jul 10 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 30 2011
STATUS
approved