login
a(n) = Sum_{k=0..n} C(floor((n+1)/2),floor((k+1)/2)) * 3^k.
2

%I #14 May 09 2024 09:08:00

%S 1,4,13,52,133,604,1333,6772,13333,74284,133333,801892,1333333,

%T 8550364,13333333,90286612,133333333,945912844,1333333333,9846548932,

%U 13333333333,101952273724,133333333333,1050903796852,1333333333333

%N a(n) = Sum_{k=0..n} C(floor((n+1)/2),floor((k+1)/2)) * 3^k.

%C a(n) = (4/3){1,10,10,100,100,1000...} -9{0,1,0,9,0,81...} -(1/3){1,1,1,1,1,1...} .

%C a(2n) = A097166(n).

%C a(2n+1)/4 = A097168(n).

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,19,-19,-90,90)

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

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

%F a(n) = a(n-1) +19a(n-2) -19a(n-3) -90a(n-4) +90a(n-5).

%t LinearRecurrence[{1,19,-19,-90,90},{1,4,13,52,133},30] (* _Harvey P. Dale_, Dec 15 2017 *)

%Y Cf. A097162, A075427.

%K easy,nonn

%O 0,2

%A _Paul Barry_, Jul 30 2004