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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052531 If n is even then 2^n+1 otherwise 2^n. 1
2, 2, 5, 8, 17, 32, 65, 128, 257, 512, 1025, 2048, 4097, 8192, 16385, 32768, 65537, 131072, 262145, 524288, 1048577, 2097152, 4194305, 8388608, 16777217, 33554432, 67108865, 134217728, 268435457, 536870912, 1073741825, 2147483648 (list; graph; refs; listen; history; internal format)
OFFSET

0,1

LINKS

INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 461

Index to sequences with linear recurrences with constant coefficients, signature (2,1,-2).

FORMULA

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

Recurrence: {a(1)=2, a(2)=5, a(0)=2, -2*a(n)-a(n+1)+a(n+2)+1=0.}

2^n+Sum(1/2*_alpha^(-n), _alpha=RootOf(-1+_Z^2))

MAPLE

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

MATHEMATICA

2^# + (1 - Mod[ #, 2]) & /@ Range[0, 31] - from Peter Pein

f1[n_]:=2*n+1; f2[n_]:=2*(n-1); a=2; lst={a}; Do[AppendTo[lst, a=f1[a]]; AppendTo[lst, a=f2[a]], {n, 20}]; lst [From Vladimir Orlovsky (4vladimir(AT)gmail.com), Feb 07 2010]

CROSSREFS

Sequence in context: A006367 A077902 A005834 * A095005 A019086 A076949

Adjacent sequences:  A052528 A052529 A052530 * A052532 A052533 A052534

KEYWORD

easy,nonn

AUTHOR

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

EXTENSIONS

More terms from James A. Sellers (sellersj(AT)math.psu.edu), Jun 05 2000

Better definition from Peter Pein (petsie(AT)dordos.net), Jan 11 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 23:53 EST 2012. Contains 205689 sequences.