A191007 a(n) = n*2^(n+1) + (2^(n+3)+(-1)^n)/3.
3, 9, 27, 69, 171, 405, 939, 2133, 4779, 10581, 23211, 50517, 109227, 234837, 502443, 1070421, 2271915, 4805973, 10136235, 21321045, 44739243, 93672789, 195734187, 408245589, 850045611, 1767200085, 3668617899, 7605671253, 15748213419, 32570168661, 67287820971
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (3,0,-4).
Crossrefs
3 times A045883.
Programs
-
Magma
[n*2^(n+1)+(2^(n+3)+(-1)^n)/3: n in [0..30]]; // Vincenzo Librandi, Oct 16 2014
-
Mathematica
Table[n 2^(n + 1) + (2^(n + 3) + (-1)^n)/3, {n, 0, 70}] (* Vincenzo Librandi, Oct 16 2014 *) LinearRecurrence[{3,0,-4},{3,9,27},40] (* Harvey P. Dale, Feb 11 2024 *)
-
PARI
a(n) = n*2^(n+1) + (2^(n+3)+(-1)^n)/3; \\ Michel Marcus, Oct 16 2014
Formula
a(n) = n*2^(n+1) + (2^(n+3)+(-1)^n)/3.
a(n) = 3 * A045883(n+1).
G.f.: 3/((1 + x)*(1 - 2*x)^2). [Bruno Berselli, Oct 16 2014]
Extensions
Formula corrected and more terms from Michel Marcus, Oct 16 2014
Comments