A140960 a(n) = (2*(-1)^n - 2^(n+1) + 3*n*2^n)/9.
0, 0, 2, 6, 18, 46, 114, 270, 626, 1422, 3186, 7054, 15474, 33678, 72818, 156558, 334962, 713614, 1514610, 3203982, 6757490, 14214030, 29826162, 62448526, 130489458, 272163726, 566697074, 1178133390, 2445745266, 5070447502, 10498808946, 21713445774, 44858547314
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,0,-4)
Programs
-
Magma
[( 2*(-1)^n-2^(n+1)+3*n*2^n)/9: n in [0..40]]; // Vincenzo Librandi, Aug 08 2011
-
Mathematica
LinearRecurrence[{3,0,-4},{0,0,2},40] (* Harvey P. Dale, Apr 14 2015 *)
-
PARI
a(n)=(2*(-1)^n-2^(n+1)+3*n*2^n)/9 \\ Charles R Greathouse IV, Oct 16 2015
Formula
Extensions
Definition replaced with Lava's closed form of August 2008 by R. J. Mathar, Feb 11 2010
Comments