|
|
A166920
|
|
a(n) = 2^n - (1 + (-1)^n)/2.
|
|
10
|
|
|
0, 2, 3, 8, 15, 32, 63, 128, 255, 512, 1023, 2048, 4095, 8192, 16383, 32768, 65535, 131072, 262143, 524288, 1048575, 2097152, 4194303, 8388608, 16777215, 33554432, 67108863, 134217728, 268435455, 536870912, 1073741823, 2147483648, 4294967295
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Partial sums of A014551. The inverse binomial transform yields a sequence 0,2,-1,5,-7,17,...: zero followed by a sign alternating A014551.
The table of a(n) plus higher order differences in successive rows shows A131577 on the main diagonal.
a(n) = 2^n when n is odd and 2^n-1 when n is even. - Wesley Ivan Hurt, Nov 15 2013
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(2-x)/((1-x)*(1-2*x)*(1+x)).
a(n) = 2^n - (1+(-1)^n)/2.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
|
|
MAPLE
|
|
|
MATHEMATICA
|
LinearRecurrence[{2, 1, -2}, {0, 2, 3}, 40] (* Harvey P. Dale, Oct 16 2012 *)
|
|
PROG
|
(Haskell)
a166920 n = a166920_list !! n
a166920_list = scanl (+) 0 a014551_list
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|