login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052950 Expansion of (2-3*x-x^2+x^3)/((1-x)*(1+x)*(1-2*x)). 6
2, 1, 3, 4, 9, 16, 33, 64, 129, 256, 513, 1024, 2049, 4096, 8193, 16384, 32769, 65536, 131073, 262144, 524289, 1048576, 2097153, 4194304, 8388609, 16777216, 33554433, 67108864, 134217729, 268435456, 536870913, 1073741824, 2147483649 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Equals row sums of triangle A178616 but replacing the 2 with a 1. - Gary W. Adamson, May 30 2010

Inverse binomial transform is (-1)^n * a(n). - Michael Somos, Jun 03 2014

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..1000

INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 1009

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

FORMULA

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

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

a(n) = 2^(n-1) + Sum_{alpha=RootOf(-1+z^2)} alpha^(-n)/2.

From Paul Barry, Sep 18 2003: (Start)

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

E.g.f.: cosh(x)*(1+exp(x)). (End)

a(2*n + 1) = 4 * a(2*n - 1) for all n in Z. a(2*n + 2) = 3*a(2*n + 1) + 2*a(2*n) if n>0. - Michael Somos, Jun 04 2014

EXAMPLE

G.f. = 2 + x + 3*x^2 + 4*x^3 + 9*x^4 + 16*x^5 + 33*x^6 + 64*x^7 + 129*x^8 + ...

MAPLE

spec:= [S, {S=Union(Sequence(Prod(Sequence(Z), Z)), Sequence(Prod(Z, Z)))}, unlabeled ]: seq(combstruct[count ](spec, size=n), n=0..20);

seq(`if`(n=0, 2, (2^n +1 +(-1)^n)/2), n=0..40); # G. C. Greubel, Oct 21 2019

MATHEMATICA

a[n_]:= (2^n +1 +(-1)^n +Boole[n==0])/2; (* Michael Somos, Jun 03 2014 *)

a[n_]:= If[ n<0, (1-n)! SeriesCoefficient[Sinh[x] +Exp[x/2], {x, 0, 1-n}], n! SeriesCoefficient[Cosh[x](1+Exp[x]), {x, 0, n}]]; (* Michael Somos, Jun 04 2014 *)

LinearRecurrence[{2, 1, -2}, {2, 1, 3, 4}, 40] (* G. C. Greubel, Oct 21 2019 *)

PROG

(PARI) {a(n)=(2^n+1+(-1)^n+(n==0))/2}; /* Michael Somos, Jun 03 2014 */

(MAGMA) [2] cat [(2^n +1 +(-1)^n)/2: n in [1..40]]; // G. C. Greubel, Oct 21 2019

(Sage) [2]+[(2^n +1 +(-1)^n)/2 for n in (1..40)] # G. C. Greubel, Oct 21 2019

(GAP) Concatenation([2], List([1..40], n-> (2^n +1 +(-1)^n)/2));  # G. C. Greubel, Oct 21 2019

CROSSREFS

Cf. A178616. - Gary W. Adamson, May 30 2010

Sequence in context: A019612 A007444 A166476 * A086851 A001054 A218209

Adjacent sequences:  A052947 A052948 A052949 * A052951 A052952 A052953

KEYWORD

easy,nonn

AUTHOR

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

EXTENSIONS

More terms from James A. Sellers, Jun 05 2000

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 December 9 17:18 EST 2019. Contains 329879 sequences. (Running on oeis4.)