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

%I #26 Sep 08 2022 08:45:49

%S 12,70,532,4510,39772,355510,3192292,28708750,258313132,2324621350,

%T 20921001652,188287243390,1694579876092,15251202941590,

%U 137260778644612,1235346864312430,11118121348344652,100063090843700230,900567813719097172,8105110311849259870

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

%H Vincenzo Librandi, <a href="/A169725/b169725.txt">Table of n, a(n) for n = 1..1000</a>

%H Alice V. Kleeva, <a href="/A169725/a169725a.jpg">Grid for this sequence</a>

%H Alice V. Kleeva, <a href="/A169725/a169725b.jpg">Illustration of initial terms</a>

%H Robert Munafo, <a href="http://www.mrob.com/pub/math/seq-a169720.html">Sequence A169720, and two others by Alice V. Kleeva</a>

%H Robert Munafo, <a href="/A169720/a169720.pdf">Sequence A169720, and two others by Alice V. Kleeva</a> [Cached copy, in pdf format, included with permission]

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (13,-39,27).

%F From _R. J. Mathar_, Apr 26 2010: (Start)

%F a(n) = 13*a(n-1) - 39*a(n-2) + 27*a(n-3).

%F G.f.: x*( -12 + 86*x - 90*x^2 ) / ( (x-1)*(3*x-1)*(9*x-1) ). (End)

%F E.g.f.: (2*exp(9*x) + 5*exp(3*x) + 3*exp(x) - 10)/3. - _Stefano Spezia_, Dec 25 2021

%p A169725 := proc(n)

%p 3^(n-1)*(6*3^(n-1)+5)+1 ;

%p end proc: # _R. J. Mathar_, Jun 02 2016

%t Table[3^(n-1) (6 3^(n - 1) + 5) + 1, {n, 20}] (* or *) LinearRecurrence[{13, -39, 27}, {12, 70, 532}, 20] (* _Harvey P. Dale_, Aug 10 2011 *)

%t CoefficientList[Series[(-12 + 86 x - 90 x^2)/((x - 1) (3 x - 1) (9 x - 1)), {x, 0, 30}], x] (* _Vincenzo Librandi_, Dec 03 2012 *)

%o (Magma) I:=[12, 70, 532]; [n le 3 select I[n] else 13*Self(n-1) -39*Self(n-2) +27*Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Dec 03 2012

%Y Cf. A169720-A169727, A100702.

%K nonn,easy

%O 1,1

%A Alice V. Kleeva (alice27353(AT)gmail.com), Jan 19 2010

%E G.f. adapted to the offset by _Vincenzo Librandi_, Dec 03 2012