OFFSET
1,1
COMMENTS
Conjecture: generating function = -((2 (-1+6 x-19 x^2+31 x^3-22 x^4+4 x^5))/(1-3 x+2 x^2)^3) - Harvey P. Dale, May 10 2021
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (9,-33,63,-66,36,-8).
FORMULA
G.f.: -2*x*(-1 + 6*x - 19*x^2 + 31*x^3 - 22*x^4 + 4*x^5) / ( (2*x-1)^3*(x-1)^3 ). - R. J. Mathar, Aug 26 2011
MATHEMATICA
LinearRecurrence[{9, -33, 63, -66, 36, -8}, {2, 6, 26, 100, 332, 994}, 50] (* Vincenzo Librandi, Nov 25 2011 *)
Table[n(2^n-n+1)+2^(n-1) (n^2-3n+2), {n, 30}] (* Harvey P. Dale, May 10 2021 *)
PROG
(PARI) a(n)=(n^2-n+2)<<(n-1)-n*(n-1) \\ Charles R Greathouse IV, Jul 13 2011
(Magma) [n*(2^n-n+1)+2^(n-1)*(n^2-3*n+2): n in [1..40]]; // Vincenzo Librandi, Nov 25 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Adeniji, Adenike, Jun 17 2011
STATUS
approved