A191821 a(n) = n*(2^n - n + 1) + 2^(n-1)*(n^2 - 3*n + 2).
2, 6, 26, 100, 332, 994, 2774, 7368, 18872, 47014, 114578, 274300, 647012, 1507146, 3473198, 7929616, 17956592, 40369870, 90177194, 200277636, 442498652, 973078066, 2130705926, 4647288280, 10099883432, 21877489014, 47244639554, 101737037068
Offset: 1
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).
Programs
-
Magma
[n*(2^n-n+1)+2^(n-1)*(n^2-3*n+2): n in [1..40]]; // Vincenzo Librandi, Nov 25 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 *)
-
PARI
a(n)=(n^2-n+2)<<(n-1)-n*(n-1) \\ Charles R Greathouse IV, Jul 13 2011
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
Comments