login
a(n) = 2*a(n-1) + 12*a(n-2).
18

%I #30 Sep 08 2022 08:45:13

%S 1,2,16,56,304,1280,6208,27776,130048,593408,2747392,12615680,

%T 58200064,267788288,1233977344,5681414144,26170556416,120518082560,

%U 555082842112,2556382674944,11773759455232,54224111009792,249733335482368

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

%C Binomial transform of 1, 1, 13, 13, 169, 169, ....

%C The inverse binomial transform of 2^n*c(n), where c(n) is the solution to c(n) = c(n-1) + k*c(n-2), a(0)=1, a(1)=1 is 1, 1, 4k+1, 4k+1, (4k+1)^2, ...

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

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

%F a(n) = A000079(n)*A006130(n).

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

%F a(n) = ((1+sqrt(13))*(1+sqrt(13))^n - (1-sqrt(13))*(1-sqrt(13))^n) /(2*sqrt(13)).

%F a(n) = Sum_{k=0..floor(n/2)} C(n+1,2*k+1) * 13^k. - _Paul Barry_, Jan 15 2007

%p a := proc(n) option remember: if n=0 then 1 elif n=1 then 2 elif n>=2 then 2*procname(n-1) + 12*procname(n-2) fi; end: # _Muniru A Asiru_, Jan 31 2018

%t LinearRecurrence[{2,12},{1,2},30] (* or *) With[{s=Sqrt[13]},Table[ Simplify[ -(((13+s)((1-s)^n-(1+s)^n))/(26(1+s)))],{n,30}]] (* _Harvey P. Dale_, May 25 2013 *)

%o (Sage) [lucas_number1(n,2,-12) for n in range(1, 30)] # _Zerinvary Lajos_, Apr 22 2009

%o (PARI) my(x='x+O('x^30)); Vec(1/(1-2*x-12*x^2)) \\ _G. C. Greubel_, Jan 30 2018

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!(1/(1-2*x-12*x^2))) // _G. C. Greubel_, Jan 30 2018

%o (GAP) a := [1,2];; for n in [3..30] do a[n] := 2*a[n-1] + 12*a[n-2]; od; a; # _Muniru A Asiru_, Jan 31 2018

%Y Cf. A003683, A063727.

%K easy,nonn

%O 0,2

%A _Paul Barry_, Feb 12 2004