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

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

%S 6,28,190,1540,13366,118828,1065070,9572500,86113126,774900028,

%T 6973745950,62762650660,564860667286,5083736439628,45753599258830,

%U 411782307236020,3706040506843846,33354363786753628,300189271756259710,2701703438832768580

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

%C A subsequence of the triangular numbers A000217.

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

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

%H Alice V. Kleeva, <a href="/A169723/a169723b.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">Index entries for linear recurrences with constant coefficients</a>, signature (13,-39,27).

%F G.f.: x*(-6+50*x-60*x^2)/((x-1)*(3*x-1)*(9*x-1)). - _Vincenzo Librandi_, Dec 03 2012

%F a(n) = 13*a(n-1)-39*a(n-2)+27*a(n-3). - _Vincenzo Librandi_, Dec 03 2012

%F a(n) = 2*9^(n-1)+3^n+1. - _Bruno Berselli_, Dec 05 2012

%t LinearRecurrence[{13, -39, 27}, {6, 28, 190}, 50] (* or *) CoefficientList[Series[(-6 + 50 x - 60 x^2)/((x - 1) (3 x - 1) (9 x - 1)), {x, 0, 20}], x] (* _Vincenzo Librandi_, Dec 03 2012 *)

%o (Magma) I:=[6,28,190]; [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