OFFSET
1,2
FORMULA
Binomial transform of [1, 1, -1, 1, 1, 1, ...].
From R. J. Mathar, Jul 31 2008: (Start)
O.g.f.: x(1-3x+x^2+3x^3)/((1-x)^3*(1-2x)).
a(n) = 4n - 2 - 2*A000217(n) + 2^(n-1). (End)
a(n) = 2^n - n(n-1) (if offset is 0). - Emeric Deutsch, Aug 09 2008
EXAMPLE
a(6) = 12 = (1, 5, 10, 10, 5, 1) dot (1, 1, -1, 1, 1, 1) = (1 + 5 - 10 + 10, + 5, + 1).
MAPLE
a:=proc(n) options operator, arrow: 2^n-n*(n-1) end proc: seq(a(n), n=0..32); # Emeric Deutsch, Aug 09 2008
MATHEMATICA
Table[2^n-n(n-1), {n, 0, 3*4!}] (* Vladimir Joseph Stephan Orlovsky, Apr 25 2010 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Jul 15 2008
EXTENSIONS
More terms from Emeric Deutsch, Aug 09 2008
STATUS
approved