login
a(n) = 6^n + 6*n.
2

%I #21 Sep 10 2024 20:48:31

%S 1,12,48,234,1320,7806,46692,279978,1679664,10077750,60466236,

%T 362797122,2176782408,13060694094,78364164180,470184984666,

%U 2821109907552,16926659444838,101559956668524,609359740010610,3656158440063096,21936950640377982,131621703842267268

%N a(n) = 6^n + 6*n.

%H Vincenzo Librandi, <a href="/A221908/b221908.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,-13,6).

%F G.f.: (1+4*x-35*x^2)/((1-x)^2*(1-6*x)).

%F a(n) = 8*a(n-1) - 13*a(n-2) + 6*a(n-3).

%F E.g.f.: exp(x)*(exp(5*x) + 6*x). - _Elmo R. Oliveira_, Sep 10 2024

%t Table[(6^n + 6 n), {n, 0, 30}] (* or *) CoefficientList[Series[(1 + 4 x - 35 x^2)/((1 - x)^2 (1 - 6 x)), {x, 0, 30}], x]

%o (Magma) [6^n+6*n: n in [0..30]]; /* or */ I:=[1,12,48]; [n le 3 select I[n] else 8*Self(n-1)-13*Self(n-2)+6*Self(n-3): n in [1..30]];

%o (PARI) a(n)=6^n+6*n \\ _Charles R Greathouse IV_, Apr 18 2013

%Y Cf. A198396.

%K nonn,easy

%O 0,2

%A _Vincenzo Librandi_, Mar 02 2013