OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-5,2).
FORMULA
a(n) = A007283(n-1) - n.
O.g.f.: x(2 - 4x + 3x^2)/((1-x)^2*(1-2x)). - R. J. Mathar, Jun 08 2008
E.g.f.: (1/2)*(-3 - 2*x*exp(x) + 3*exp(2*x)). - G. C. Greubel, Oct 26 2017
MATHEMATICA
lst={}; Do[AppendTo[lst, 2^n+2^(n-1)-n], {n, 5!}]; lst (* and/or *) s=2; lst={s}; Do[s+=s+n++; AppendTo[lst, s], {n, 0, 5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Oct 25 2008 *)
Table[2^n + 2^{n-1) - n, {n, 1, 50}] (* or *) LinearRecurrence[{4, -5, 2}, {2, 4, 9}, 50] (* G. C. Greubel, Oct 26 2017 *)
PROG
(PARI) for(n=1, 31, print1(2^n+2^(n-1)-n, ", "))
(Magma) [2^n + 2^(n-1) - n: n in [1..40] ]; // Vincenzo Librandi, May 18 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Oct 09 2006
STATUS
approved