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) = a(n-1) + a(n-2) + n + 2 with n>1, a(0)=1, a(1)=2.
2

%I #28 Aug 26 2024 19:35:12

%S 1,2,7,14,27,48,83,140,233,384,629,1026,1669,2710,4395,7122,11535,

%T 18676,30231,48928,79181,128132,207337,335494,542857,878378,1421263,

%U 2299670,3720963,6020664,9741659,15762356,25504049,41266440,66770525,108037002,174807565

%N a(n) = a(n-1) + a(n-2) + n + 2 with n>1, a(0)=1, a(1)=2.

%H Bruno Berselli, <a href="/A210728/b210728.txt">Table of n, a(n) for n = 0..1000</a>

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

%F G.f.: (1-x+3*x^2-2*x^3)/((1-x)^2*(1-x-x^2)). - _Bruno Berselli_, Jun 27 2012

%F a(n) = ((5+sqrt(5))*(1+sqrt(5))^(n+1)-(5-sqrt(5))*(1-sqrt(5))^(n+1))/(2^(n+1)*sqrt(5))-n-5. - _Bruno Berselli_, Jun 27 2012

%F a(n) = -n-5+A022112(n+1). _R. J. Mathar_, Jul 03 2012

%t RecurrenceTable[{a[0] == 1, a[1] == 2, a[n] == a[n - 1] + a[n - 2] + n + 2}, a, {n, 36}] (* _Bruno Berselli_, Jun 27 2012 *)

%t nxt[{n_,a_,b_}]:={n+1,b,a+b+n+3}; NestList[nxt,{1,1,2},40][[;;,2]] (* _Harvey P. Dale_, Aug 26 2024 *)

%Y Cf. A065220: a(n)=a(n-1)+a(n-2)+n-5, a(0)=1,a(1)=2 (except first 2 terms).

%Y Cf. A168043: a(n)=a(n-1)+a(n-2)+n-3, a(0)=1,a(1)=2 (except first 2 terms).

%Y Cf. A131269: a(n)=a(n-1)+a(n-2)+n-2, a(0)=1,a(1)=2.

%Y Cf. A000126: a(n)=a(n-1)+a(n-2)+n-1, a(0)=1,a(1)=2.

%Y Cf. A104161: a(n)=a(n-1)+a(n-2)+n, a(0)=1,a(1)=2 (except the first term).

%Y Cf. A192969: a(n)=a(n-1)+a(n-2)+n+1, a(0)=1,a(1)=2.

%Y Cf. A210729: a(n)=a(n-1)+a(n-2)+n+3, a(0)=1,a(1)=2.

%K nonn,easy

%O 0,2

%A _Alex Ratushnyak_, May 10 2012