%I #9 Sep 08 2022 08:45:54
%S 1,3,15,87,503,2871,16311,92599,525751,2985399,16952759,96267703,
%T 546663863,3104271799,17627835831,100100959671,568430652855,
%U 3227875241399,18329726840247,104086701305271,591063984860599
%N The Gi4 sums of the Pell-Jacobsthal triangle A013609.
%C The a(n) represent the Gi4 sums of the Pell-Jacobsthal triangle A013609. See A180662 for information about these giraffe and other chess sums.
%H G. C. Greubel, <a href="/A180677/b180677.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (9,-24,32,-16).
%F a(n) = 9*a(n-1) - 24*a(n-2) + 32*a(n-3) - 16*a(n-4) with a(0)=1, a(1)=3, a(2)= 15 and a(3)= 87.
%F a(n) = Sum_{k=0..n} A013609(n+3*k,n-k).
%F G.f.: (1-6*x+12*x^2-8*x^3)/(1-9*x+24*x^2-32*x^3+16*x^4).
%p nmax:=21: a(0):=1: a(1):=3: a(2):=15: a(3):=87: for n from 4 to nmax do a(n) := 9*a(n-1)-24*a(n-2)+32*a(n-3)-16*a(n-4) od: seq(a(n),n=0..nmax);
%t LinearRecurrence[{9,-24,32,-16}, {1,3,15,87}, 30] (* _G. C. Greubel_, Jun 11 2019 *)
%o (PARI) my(x='x+O('x^30)); Vec((1-6*x+12*x^2-8*x^3)/(1-9*x+24*x^2-32*x^3 +16*x^4)) \\ _G. C. Greubel_, Jun 11 2019
%o (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-6*x+ 12*x^2-8*x^3)/(1-9*x+24*x^2-32*x^3+16*x^4) )); // _G. C. Greubel_, Jun 11 2019
%o (Sage) ((1-6*x+12*x^2-8*x^3)/(1-9*x+24*x^2-32*x^3+16*x^4)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Jun 11 2019
%o (GAP) a:=[1,3,15,87];; for n in [5..30] do a[n]:=9*a[n-1]-24*a[n-2] +32*a[n-3]-16*a[n-4]; od; a; # _G. C. Greubel_, Jun 11 2019
%Y Cf. A052942 (Gi1), A008999 (Gi2), A180676 (Gi3), this sequence (Gi4).
%Y Cf. A013609, A180662.
%K easy,nonn
%O 0,2
%A _Johannes W. Meijer_, Sep 21 2010