OFFSET
0,3
COMMENTS
Original name was: Generalized Jacobsthal numbers.
Row sums of triangle A131087. - Gary W. Adamson, Jun 14 2007
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-1,-3,2).
FORMULA
a(n) = 2^n + (-1)^n/4 - (2*n+1)/4.
a(n+2) = a(n+1) + 2*a(n) + n, a(0)=1, a(1)=1.
a(n) = floor(2^n - n*(n+1)/2). - Zerinvary Lajos, Apr 29 2007
G.f.: (1 - 2*x + x^2 + x^3)/(1 - 3*x + x^2 + 3*x^3 - 2*x^4). - Colin Barker, Jan 16 2012
MAPLE
seq(floor(2^n-n(n+1)/2), n=0..31); # Zerinvary Lajos, Apr 29 2007
MATHEMATICA
LinearRecurrence[{3, -1, -3, 2}, {1, 1, 3, 6}, 40] (* Harvey P. Dale, Feb 17 2021 *)
PROG
(Magma) [2^n+(-1)^n/4-(2*n+1)/4: n in [0..35]]; // Vincenzo Librandi, Jul 05 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, May 18 2003
STATUS
approved