login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A045621 a(n) = 2^n - binomial(n, floor(n/2)). 13
0, 1, 2, 5, 10, 22, 44, 93, 186, 386, 772, 1586, 3172, 6476, 12952, 26333, 52666, 106762, 213524, 431910, 863820, 1744436, 3488872, 7036530, 14073060, 28354132, 56708264, 114159428, 228318856, 459312152, 918624304, 1846943453, 3693886906 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
p(n) = a(n)/2^n is the probability that a majority of heads had occurred at some point after n flips of a fair coin. For example, after 3 flips of a coin, the probability is 5/8 that a majority of heads had occurred at some point. (First flip is heads, p=1/2, or sequence THH, p=1/8.) - Brian Galebach, May 14 2001
Hankel transform is (-1)^n*n. - Paul Barry, Jan 11 2007
Hankel transform of a(n+1) is A127630. - Paul Barry, Sep 01 2009
a(n) is the number of n-step walks on the number line that are positive at some point along the walk. - Benjamin Phillabaum, Mar 06 2011
LINKS
Kairi Kangro, Mozhgan Pourmoradnasseri, Dirk Oliver Theis, Short note on the number of 1-ascents in dispersed dyck paths, arXiv:1603.01422 [math.CO], 2016.
S. Mason and J. Parsley, A geometric and combinatorial view of weighted voting, arXiv preprint arXiv:1109.1082 [math.CO], 2011.
FORMULA
a(n) = 2^n - A001405(n).
a(2*k) = 2*a(2*k-1), a(2*k+1) = 2*a(2*k) + Catalan(k).
a(n+1) = b(0)*b(n)+b(1)*b(n-1)+...+b(n)*b(0), b(k)=C(k, [ k/2 ]).
G.f.: c(x^2)*x/(1-2*x) where c(x) = g.f. for Catalan numbers A000108.
a(n) = A054336(n, 1) (second column of triangle).
E.g.f.: exp(2*x) - I_0(2*x) - I_1(2*x) where I_n(x) is n-th modified Bessel function as a function of x. - Benjamin Phillabaum, Mar 06 2011
a(2*n+1) = A000346(n); a(2*n) = A068551(n). - Emeric Deutsch, Nov 16 2003
a(n) = Sum_{k=0..n-1} binomial(n, floor(k/2)). - Paul Barry, Aug 05 2004
a(n+1) = 2*a(n) + Catalan(n/2)*(1+(-1)^n)/2. - Paul Barry, Aug 05 2004
a(n+1) = Sum_{k=0..floor(n/2)} 2^(n-2*k)*A000108(k). - Paul Barry, Sep 01 2009
(n+1)*a(n) +2*(-n-1)*a(n-1) +4*(-n+2)*a(n-2) +8*(n-2)*a(n-3) = 0. - R. J. Mathar, Dec 02 2012
MAPLE
seq( 2^n -binomial(n, floor(n/2)), n=0..35); # G. C. Greubel, Jan 13 2020
MATHEMATICA
Table[2^n - Binomial[n, Floor[n/2]], {n, 0, 35}] (* Roger L. Bagula, Aug 26 2006 *)
PROG
(PARI) {a(n)=if(n<0, 0, 2^n -binomial(n, n\2))} /* Michael Somos, Oct 31 2006 */
(Magma) [2^n - Binomial(n, Floor(n/2)): n in [0..35]]; // Bruno Berselli, Mar 08 2011
(Sage) [2^n -binomial(n, floor(n/2)) for n in (0..35)] # G. C. Greubel, Jan 13 2020
(GAP) List([0..35], n-> 2^n - Binomial(n, Int(n/2)) ); # G. C. Greubel, Jan 13 2020
CROSSREFS
Sequence in context: A094537 A135098 A136488 * A026655 A336484 A244398
KEYWORD
nonn
AUTHOR
David M Bloom, Brooklyn College
EXTENSIONS
Edited by N. J. A. Sloane, Oct 08 2006
Adjustments to formulas (correcting offsets) from Michael Somos, Oct 31 2006
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 14 09:06 EDT 2024. Contains 371657 sequences. (Running on oeis4.)