login
a(n) = 4^n*(1 + (23/8)*n + (9/8)*n^2).
3

%I #27 Jun 10 2024 00:13:32

%S 1,20,180,1264,7808,44544,240640,1249280,6291456,30932992,149159936,

%T 707788800,3313500160,15334375424,70262980608,319169757184,

%U 1438814044160,6442450944000,28673201668096,126924873531392,559101662724096,2451910929940480,10709243254538240,46601700831657984

%N a(n) = 4^n*(1 + (23/8)*n + (9/8)*n^2).

%C The sequences A(n,k) = Sum_{j=0..n} Sum_{i=0..j} (-1)^(j-i) * binomial(n,j) *binomial(j,i) * binomial(j+k+(k+1)*i,j+k) are C-sequences for fixed integer k, here A(n,k=2) = a(n).

%H Winston de Greef, <a href="/A361609/b361609.txt">Table of n, a(n) for n = 0..1640</a>

%H Project Euler, <a href="https://projecteuler.net/problem=831">Problem 831. Triple Product</a>

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

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

%F a(n) = 12*a(n-1) -48*a(n-2) +64*a(n-3).

%F D-finite with recurrence (-9*n^2-5*n+6)*a(n) +4*(9*n^2+23*n+8)*a(n-1)=0.

%t LinearRecurrence[{12, -48, 64}, {1, 20, 180}, 25] (* or *)

%t A361609[n_] := 4^n (1 + 23/8 n + 9/8 n^2);

%t Array[A361609, 25, 0] (* _Paolo Xausa_, Jan 18 2024 *)

%o (Python)

%o def A361609(n): return (n*(9*n + 23) + 8)<<((n<<1)-3) if n > 1 else 19*n+1 # _Chai Wah Wu_, Mar 17 2023

%Y Cf. A027471 (k=1), A361610 (k=3), A361608 (k=5).

%K nonn,easy

%O 0,2

%A _R. J. Mathar_, Mar 17 2023