A141023 a(n) = 2^n - (3-(-1)^n)/2.
0, 0, 3, 6, 15, 30, 63, 126, 255, 510, 1023, 2046, 4095, 8190, 16383, 32766, 65535, 131070, 262143, 524286, 1048575, 2097150, 4194303, 8388606, 16777215, 33554430, 67108863, 134217726, 268435455, 536870910, 1073741823, 2147483646, 4294967295, 8589934590, 17179869183
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,1,-2).
Crossrefs
Cf. A062510 (first differences).
Programs
-
Magma
[2^n -(3-(-1)^n)/2: n in [0..40]]; // Vincenzo Librandi, Aug 08 2011
-
Mathematica
Range[0,20]! CoefficientList[Series[D[(Cosh[x]-1)(Exp[x]-1), x], {x,0,20}], x] (* Geoffrey Critzer, Dec 03 2011 *) LinearRecurrence[{2, 1, -2}, {0, 0, 3}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 14 2012 *) Table[2^n - (3 - (-1)^n)/2, {n, 0, 34}] (* Alonso del Arte, Feb 14 2012 *)
-
PARI
x='x+O('x^50); concat([0,0], Vec(3*x^2/((x-1)*(2*x-1)*(1+x)))) \\ G. C. Greubel, Oct 10 2017
Formula
a(n) = 3*A000975(n-1).
G.f.: 3*x^2/( (x-1)*(2*x-1)*(1+x) ). - R. J. Mathar, Jul 07 2011