login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

Vincenzo Librandi, Table of n, a(n) for n = 0..200

Index entries for linear recurrences with constant coefficients, signature (2,1,-2).

FORMULA

G.f.: x*(2-x)/((1-x)*(1-2*x)*(1+x)).

a(n) = 2^n - (1+(-1)^n)/2.

a(2*n) = A024036(n); a(2*n+1) = A004171(n).

a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).

a(n+1) - 2*a(n) = A168361(n).

a(n) = A000225(n+1) - A051049(n) = A014551(n) - A168361(n).

E.g.f.: exp(2*x) - cosh(x). - G. C. Greubel, May 28 2016

a(n) = Sum_{k=1..n+1} Sum_{i=0..n+1} C(n-k,i). - Wesley Ivan Hurt, Sep 22 2017

a(n) = 2*A001045(n) + A000975(n-1) for n>0. - Yuchun Ji, Aug 30 2018

MAPLE

A166920:=n->2^n-(1+(-1)^n)/2; seq(A166920(n), n=0..50); # Wesley Ivan Hurt, Nov 15 2013

MATHEMATICA

LinearRecurrence[{2, 1, -2}, {0, 2, 3}, 40] (* Harvey P. Dale, Oct 16 2012 *)

PROG

(MAGMA) [2^n -(1+(-1)^n)/2: n in [0..30]]; // Vincenzo Librandi, May 16 2011

(Haskell)

a166920 n = a166920_list !! n

a166920_list = scanl (+) 0 a014551_list

-- Reinhard Zumkeller, Jan 02 2013

(PARI) a(n)=2^n-(1+(-1)^n)/2 \\ Charles R Greathouse IV, Oct 07 2015

CROSSREFS

Cf. A004171, A014551, A024036, A131577, A168361.

Sequence in context: A011946 A195095 A331829 * A242510 A080206 A132862

Adjacent sequences:  A166917 A166918 A166919 * A166921 A166922 A166923

KEYWORD

nonn,easy

AUTHOR

Paul Curtz, Oct 23 2009

EXTENSIONS

Edited and extended by R. J. Mathar, Mar 02 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 26 20:56 EDT 2021. Contains 346300 sequences. (Running on oeis4.)