A192424 a(n) = A192423(n)/2.
1, 0, 2, 1, 8, 10, 39, 70, 208, 439, 1162, 2640, 6641, 15600, 38362, 91481, 222688, 534650, 1295559, 3119990, 7544888, 18194639, 43958642, 106072320, 256167361, 618303360, 1492941842, 3603915601, 8701212248, 21005629450
Offset: 0
Examples
The first five polynomials p(n,x) and their reductions are as follows: p(0,x) = 2 -> 2 p(1,x) = x -> x p(2,x) = 2 + x^2 -> 4 + x p(3,x) = 3*x + x^3 -> 2 + 6*x p(4,x) = 2 + 4*x^2 + x^4 -> 16 + 9*x. From these, read A192423(n) = 2*a(n) = (2, 0, 4, 2, 16, ...) and A192425 = (0, 1, 1, 6, 9, ...).
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,4,-1,-1).
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+x)*(1-2*x)/((1+x-x^2)*(1-2*x-x^2)) )); // G. C. Greubel, Jul 12 2023 -
Mathematica
(See A192423.) LinearRecurrence[{1,4,-1,-1}, {1,0,2,1}, 40] (* G. C. Greubel, Jul 12 2023 *)
-
SageMath
@CachedFunction def a(n): # a = A192424 if (n<4): return (1,0,2,1)[n] else: return a(n-1) +4*a(n-2) -a(n-3) -a(n-4) [a(n) for n in range(41)] # G. C. Greubel, Jul 12 2023
Formula
From G. C. Greubel, Jul 11 2023: (Start)
a(n) = (1/2)*Sum_{j=0..n} T(n, j)*A078008(j), where T(n, k) = [x^k] ((x + sqrt(x^2+4))^n + (x - sqrt(x^2+4))^n)/2^n.
a(n) = a(n-1) + 4*a(n-2) - a(n-3) - a(n-4).
G.f.: (1+x)*(1-2*x)/((1+x-x^2)*(1-2*x-x^2)). (End)