Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #29 Sep 10 2024 20:21:11
%S 1,6,15,36,93,258,747,2208,6585,19710,59079,177180,531477,1594362,
%T 4783011,14348952,43046769,129140214,387420543,1162261524,3486784461,
%U 10460353266,31381059675,94143178896,282429536553,847288609518,2541865828407,7625597485068,22876792455045
%N a(n) = 3^n + 3*n.
%H Vincenzo Librandi, <a href="/A221905/b221905.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 (5,-7,3).
%F G.f.: (1 + x - 8*x^2)/((1-x)^2*(1-3*x)).
%F a(n) = 5*a(n-1) - 7*a(n-2) + 3*a(n-3).
%F a(n) = A176805(n) - 1.
%F E.g.f.: exp(x)*(exp(2*x) + 3*x). - _Elmo R. Oliveira_, Sep 10 2024
%t Table[(3^n + 3 n), {n, 0, 30}] (* or *) CoefficientList[Series[(1 + x - 8 x^2)/((1 - x)^2 (1 -3 x)), {x, 0, 30}], x]
%o (Magma) [3^n+3*n: n in [0..30]]; /* or */ I:=[1, 6, 15]; [n le 3 select I[n] else 5*Self(n-1)-7*Self(n-2)+3*Self(n-3): n in [1..30]];
%Y Cf. A107583, A176805, A370658.
%K nonn,easy
%O 0,2
%A _Vincenzo Librandi_, Mar 02 2013