login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = 3^(n+1) - 2^(n+1) + n + 1.
2

%I #15 Oct 11 2022 10:32:05

%S 2,7,22,69,216,671,2066,6313,19180,58035,175110,527357,1586144,

%T 4766599,14316154,42981201,129009108,387158363,1161737198,3485735845,

%U 10458256072,31376865327,94134790242,282412759289,847255055036

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

%C Row sums of A094617.

%H Robert Israel, <a href="/A094618/b094618.txt">Table of n, a(n) for n = 0..2092</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (7,-17,17,-6).

%F a(n) = 2*a(n-1) + 1 - n + 3^n, a(0) = 2.

%F G.f.: (2-7*x+7*x^2)/(1-7*x+17*x^2-17*x^3+6*x^4). - _Robert Israel_, Jul 22 2018

%p seq(3^(n+1) - 2^(n+1) + n + 1, n=0..100); # _Robert Israel_, Jul 22 2018

%t Table[3^(n+1)-2^(n+1)+n+1,{n,0,30}] (* or *) LinearRecurrence[{7,-17,17,-6},{2,7,22,69},30] (* _Harvey P. Dale_, Oct 11 2022 *)

%o (PARI) a(n) = 3^(n+1) - 2^(n+1) + n + 1; \\ _Michel Marcus_, Jun 05 2016

%Y Cf. A094617.

%K nonn,easy

%O 0,1

%A _Clark Kimberling_, May 14 2004

%E New definition from _Ralf Stephan_, Dec 01 2004