OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (4,-4,0,1).
FORMULA
a(n) = 2*a(n-1) + a(n-2) + n + 1; a(0)=1, a(1)=4.
a(n) = (((7/2 + (5/2)*sqrt(2))*(1+sqrt(2))^n - (7/2 - (5/2)*sqrt(2))*(1-sqrt(2))^n)/2*sqrt(2)) - (n+3)/2.
From R. J. Mathar, Feb 06 2010: (Start)
a(n) = 4*a(n-1) - 4*a(n-2) + a(n-4).
G.f.: -1/((x^2+2*x-1) * (x-1)^2). (End)
Define an array with m(n,1)=1 and m(1,k) = k*(k+1)/2 for n=1,2,3,... The interior terms are m(n,k) = m(n,k-1) + m(n-1,k-1) + m(n-1,k). The sum of the terms in each antidiagonal=a(n). - J. M. Bergot, Dec 01 2012 [This is A154948 without the first column. The diagonal is m(n,n) = A161731(n-1). R. J. Mathar, Dec 06 2012]
E.g.f.: exp(x)*(10*cosh(sqrt(2)*x) + 7*sqrt(2)*sinh(sqrt(2)*x) - 2*(3 + x))/4. - Stefano Spezia, May 13 2023
MAPLE
with(combinat):seq((fibonacci(n+3, 2)-n-3)/2, n=0..25); # Zerinvary Lajos, Jun 02 2008
MATHEMATICA
a=b=0; Table[c=2*b+a+n; a=b; b=c, {n, 1, 40}] (* Vladimir Joseph Stephan Orlovsky, Apr 02 2011*)
LinearRecurrence[{4, -4, 0, 1}, {1, 4, 12, 32}, 30] (* Harvey P. Dale, Aug 27 2014 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
More terms from Harvey P. Dale, Aug 27 2014
STATUS
approved