login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A220588
a(n) = 2^n - n^2 - n.
1
1, 0, -2, -4, -4, 2, 22, 72, 184, 422, 914, 1916, 3940, 8010, 16174, 32528, 65264, 130766, 261802, 523908, 1048156, 2096690, 4193798, 8388056, 16776616, 33553782, 67108162, 134216972, 268434644, 536870042, 1073740894, 2147482656, 4294966240, 8589933470, 17179867994
OFFSET
0,3
FORMULA
a(n) = 2*a(n - 1) + ((n - 3)^2 + 3(n - 3)) = 2*a(n - 1) + A028552(n - 3) for n > 4.
a(n) = (2*a(n-1) + 7*a(n-2))*2 = A015519/2 for n > 4.
From Colin Barker, Aug 16 2017: (Start)
G.f.: (1 - 5*x + 7*x^2 - x^3) / ((1 - x)^3*(1 - 2*x)).
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4) for n>3.
(End)
EXAMPLE
a(3) = -4 because 2^3 - 3^2 - 3 = 8 - 9 - 3 = -4.
a(4) = -4 because 2^4 - 4^2 - 4 = 16 - 16 - 4 = -4.
a(5) = 2 because 2^5 - 5^2 - 5 = 32 - 25 - 5 = 2.
a(6) = 22 because 2^6 - 6^2 - 6 = 64 - 36 - 6 = 22.
MATHEMATICA
Table[2^n - n^2 - n, {n, 0, 32}] (* Alonso del Arte, Dec 16 2012 *)
PROG
(Maxima) A220588(n):=2^n-n^2-n$ makelist(A220588(n), n, 0, 20); /* Martin Ettl, Dec 18 2012 */
(PARI) Vec((1 - 5*x + 7*x^2 - x^3) / ((1 - x)^3*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Aug 16 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Dario Piazzalunga, Dec 16 2012
EXTENSIONS
a(3) corrected by Charles A. Dagino, Aug 16 2017
STATUS
approved