login
Convolution of Jacobsthal(n) and 3^n.
9

%I #37 Jul 22 2022 01:28:18

%S 0,1,4,15,50,161,504,1555,4750,14421,43604,131495,395850,1190281,

%T 3576304,10739835,32241350,96767741,290390604,871346575,2614389250,

%U 7843866801,23532998504,70601791715,211810967550,635444087461,1906354632004,5719108635255,17157415384250

%N Convolution of Jacobsthal(n) and 3^n.

%C For k>2, a(n,k)=k^(n+1)/((k-2)(k+1))-2^(n+1)/(3k-6)-(-1)^n/(3k+3) gives the convolution of Jacobsthal(n) and k^n.

%C In general x/((1-ax)(1-ax-bx^2)) expands to Sum_{k=0..floor(n/2)} C(n-k,k+1)a^(n-k-1)*(b/a)^k. - _Paul Barry_, Oct 25 2004

%H G. C. Greubel, <a href="/A094705/b094705.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-1,-6).

%F G.f.: x/((1+x)*(1-2*x)*(1-3*x)).

%F a(n) = (3^(n+2) - 2^(n+3) - (-1)^n)/12.

%F a(n) = 4*a(n-1) -a(n-2) -6*a(n-3).

%F a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k+1)*2^(n-k-1)*(3/2)^k. - _Paul Barry_, Oct 25 2004

%F a(n) = (3^(n+1) - A001045(n+3))/4. - _G. C. Greubel_, Jul 21 2022

%t LinearRecurrence[{4,-1,-6},{0,1,4},30] (* _Harvey P. Dale_, Apr 02 2017 *)

%t Jacob0[n_] := (2^n - (-1)^n)/3; a[n_] := First@ListConvolve[Table[Jacob0[i], {i, 0, n}], 3^Range[0, n]]; Table[a[x], {x, 0, 10}] (* _Robert P. P. McKone_, Nov 28 2020 *)

%o (PARI) concat(0, Vec(x/((1+x)*(1-2*x)*(1-3*x)) + O(x^50))) \\ _Michel Marcus_, Sep 13 2014

%o (Magma) [(3^(n+2) -2^(n+3) -(-1)^n)/12: n in [0..50]]; // _G. C. Greubel_, Jul 21 2022

%o (SageMath) [(3^(n+1) - lucas_number1(n+3, 1, -2))/4 for n in (0..50)] # _G. C. Greubel_, Jul 21 2022

%Y Cf. A001045 (Jacobsthal), A000244(3^n), A045883.

%K easy,nonn

%O 0,3

%A _Paul Barry_, May 21 2004