A168298 a(n) = 1 - n^2*2^n.
1, -1, -15, -71, -255, -799, -2303, -6271, -16383, -41471, -102399, -247807, -589823, -1384447, -3211263, -7372799, -16777215, -37879807, -84934655, -189267967, -419430399, -924844031, -2030043135, -4437573631, -9663676415, -20971519999, -45365592063
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (7,-18,20,-8).
Crossrefs
Cf. A024012
Programs
-
Magma
[1-n^2*2^n: n in [0..30]]; // Vincenzo Librandi, Jul 18 2016
-
Mathematica
f[n_]:=2^n-n^2; Table[Numerator[f[n]],{n,0,-50,-1}] LinearRecurrence[{7,-18,20,-8},{1,-1,-15,-71},30] (* Harvey P. Dale, May 14 2019 *)
-
PARI
Vec(-(4*x^3-10*x^2+8*x-1)/((x-1)*(2*x-1)^3) + O(x^100)) \\ Colin Barker, Feb 10 2015
Formula
a(n)= 7*a(n-1) -18*a(n-2) +20*a(n-3) -8*a(n-4) = 1-A007758(n). - R. J. Mathar, Nov 24 2009
G.f.: -(4*x^3-10*x^2+8*x-1) / ((x-1)*(2*x-1)^3). - Colin Barker, Feb 10 2015
E.g.f.: exp(x) - 2*x*(1 + 2*x)*exp(2*x). - G. C. Greubel, Jul 17 2016
Extensions
Offset corrected, keyword:sign added, and definition simplified by R. J. Mathar, Nov 23 2009
Comments