OFFSET
0,3
COMMENTS
Essentially the same sequence as A014106.
Rows sums of A110324. Results from a general construction: the row sums of the inverse of the number triangle whose columns have e.g.f. (x^k/k!)/(1 - a*x - b*x^2), g.f. (1 - (a+2)*x - (2*b-a-1)*x^2)/(1-x)^3, and general term 1 + (b-a)*n - b*n^2. This is the binomial transform of (1, -a, -2b, 0, 0, 0, ...).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 1 + n - 2*n^2.
G.f.: (1 - 3*x - 2*x^2)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Jul 08 2012
From Elmo R. Oliveira, Nov 02 2024: (Start)
E.g.f.: exp(x)*(1 - x - 2*x^2).
MATHEMATICA
CoefficientList[Series[(1-3x-2x^2)/(1-x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Jul 08 2012 *)
LinearRecurrence[{3, -3, 1}, {1, 0, -5}, 50] (* Harvey P. Dale, Oct 20 2024 *)
PROG
(Magma) [1+n-2*n^2: n in [0..50]]; // Vincenzo Librandi, Jul 08 2012
(PARI) a(n)=1+n-2*n^2 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Jul 20 2005
STATUS
approved