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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A075427 a(0) = 1; a(n) = if n is even then a(n-1)+1 else 2*a(n-1). 16
1, 2, 3, 6, 7, 14, 15, 30, 31, 62, 63, 126, 127, 254, 255, 510, 511, 1022, 1023, 2046, 2047, 4094, 4095, 8190, 8191, 16382, 16383, 32766, 32767, 65534, 65535, 131070, 131071, 262142, 262143, 524286, 524287, 1048574, 1048575, 2097150, 2097151 (list; graph; refs; listen; history; internal format)
OFFSET

0,2

COMMENTS

Fixed points for permutations A180200, A180201, A180198, and A180199. [From Reinhard Zumkeller, Aug 15 2010]

The Kn22 sums, see A180662, of triangle A194005 equal the terms of this sequence. [Johannes W. Meijer, Aug 16 2011]

LINKS

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

Index to sequences with linear recurrences with constant coefficients, signature (0,3,0,-2)

FORMULA

a(0) = 1; for n>=1, a(2*n) = 2^(n+1)-1, a(2*n-1) = 2^(n+1)-2; a(n) = 2^floor((n+3)/2)-3/2+(-1)^n/2 - Benoit Cloitre, Sep 17 2002 [Corrected by Robert Ferreol, Jan 26 2011]

a(n) = (-1)^n/2-3/2+2^(n/2)*(1+sqrt(2)+(1-sqrt(2))*(-1)^n) - Paul Barry, Apr 22 2004

Interleaved Mersenne numbers: interleaves 2*2^n-1 and 2(2*2^n-1) (A000225(n+1) and 2*A000225(n+1)). G.f.: (1+2*x)/((1-x^2)*(1-2*x^2)); a(n) = 3*a(n-2)-2*a(n-4); a(n) = sum{k=0..n, C(floor((n+1)/2), floor((k+1)/2))}. - Paul Barry, Jul 30 2004

MAPLE

A075427 := proc(n) if type(n, 'even') then 2^(n/2+1)-1 ; else 2^(1+(n+1)/2)-2 ; end if; end proc: seq(A075427(n), n=0..40); # R. J. Mathar, Feb 18 2011

MATHEMATICA

a[0]=1; a[n_]:=a[n]=If[EvenQ[n], a[n-1]+1, 2*a[n-1]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 20 2011 *)

PROG

(MAGMA) [2^Floor((n+3)/2)-3/2+(-1)^n/2: n in [0..30]]; // Vincenzo Librandi, Aug 17 2011

CROSSREFS

Cf. A075426.

Cf. A066880. [From R. J. Mathar, Sep 23 2008]

Cf. A083416. - Robert Ferreol, Feb 16 2011

Sequence in context: A172105 A092482 A147303 * A066880 A075426 A191615

Adjacent sequences:  A075424 A075425 A075426 * A075428 A075429 A075430

KEYWORD

nonn,nice

AUTHOR

Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Sep 15 2002

EXTENSIONS

Formulae corrected and minor edits by Johannes W. Meijer, Aug 16 2011

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 13 13:22 EST 2012. Contains 205483 sequences.