login
a(n) = a(n-1) + a(n-2) + n^2 for n >= 3, a(1)=2, and a(2)=5.
0

%I #16 Apr 14 2024 02:56:54

%S 2,5,16,37,78,151,278,493,852,1445,2418,4007,6594,10797,17616,28669,

%T 46574,75567,122502,198469,321412,520365,842306,1363247,2206178,

%U 3570101,5777008,9347893,15125742,24474535,39601238,64076797,103679124

%N a(n) = a(n-1) + a(n-2) + n^2 for n >= 3, a(1)=2, and a(2)=5.

%C Each term is the sum of the previous two plus the square of its index.

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

%F a(n) = F(n)+sum(i^2; i=1 to n) + sum(F(k)*sum(j^2; j=0 to n-k-1); k=0 to n-3)).

%F G.f.: x*(x^4-4*x^3+6*x^2-3*x+2)/((1-x-x^2)*(1-x)^3). [corrected by _Bruno Berselli_, Aug 25 2010 and _R. J. Mathar_, Oct 18 2010]

%F Limiting ratio a(n+1)/a(n) = Phi = 1.618038...

%F a(n) = 2*A022095(n+2)-6*n-13-n^2. [_R. J. Mathar_, Aug 06 2010]

%F a(n)-4*a(n-1)+5*a(n-2)-a(n-3)-2*a(n-4)+a(n-5) = 0 with n>5. [_Bruno Berselli_, Aug 25 2010]

%e a(5) = a(4)+a(3)+5^2 = 16+37+25 = 78.

%Y Cf. A000045, A179991

%Y Cf. A160536, A163250. [From _Bruno Berselli_, Aug 25 2010]

%K nonn

%O 1,1

%A _Carmine Suriano_, Aug 05 2010