login
a(n) = 3^(n-1)*(2*n-3) + 2^(n+1).
3

%I #28 Mar 22 2023 09:08:17

%S 1,3,11,43,167,631,2315,8275,28943,99439,336659,1126027,3728279,

%T 12239527,39890843,129205699,416249375,1334710495,4262149667,

%U 13560765691,43005771431,135988785943,428882869931,1349402340403

%N a(n) = 3^(n-1)*(2*n-3) + 2^(n+1).

%C Binomial transform of A048495. Second binomial transform of 1, 1, 3, 5, 7, ...

%H Vincenzo Librandi, <a href="/A084643/b084643.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 (8,-21,18).

%F G.f.: (1 - 5*x + 8*x^2)/((1-2*x)*(1-3*x)^2). - _Colin Barker_, Mar 22 2012

%F E.g.f.: 2*exp(2*x) + (2*x-1)*exp(3*x). - _G. C. Greubel_, Mar 22 2023

%t LinearRecurrence[{8,-21,18},{1,3,11},30] (* _Harvey P. Dale_, Dec 12 2015 *)

%o (Magma) [3^(n-1)*(2*n-3)+2^(n+1) : n in [0..30]]; // _Vincenzo Librandi_, Sep 25 2011

%o (PARI) Vec((1-5*x+8*x^2)/(1-2*x)/(1-3*x)^2+O(x^99)) \\ _Charles R Greathouse IV_, Mar 22 2012

%o (SageMath) [2^(n+1) +3^(n-1)*(2*n-3) for n in range(41)] # _G. C. Greubel_, Mar 22 2023

%Y Cf. A048495, A060747.

%K nonn,easy

%O 0,2

%A _Paul Barry_, Jun 09 2003