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!)
A226197 Numbers of vectors with 2*n integers such that each element is either 1 or -1, and their sum > n. 1

%I #14 May 10 2014 09:51:48

%S 1,1,7,9,56,79,470,697,4048,6196,35443,55455,313912,499178,2804012,

%T 4514873,25211936,40999516,227881004,373585604,2068564064,3414035527,

%U 18844224462,31278197839,172186125456,287191809724,1577401391626,2642070371194,14483100716176,24347999094724

%N Numbers of vectors with 2*n integers such that each element is either 1 or -1, and their sum > n.

%F a(n) = sum_{k = 1+floor(n/2)...n} binomial(2n,n-k), sum of the n/2 rightmost elements of row n of A094527. - _Giovanni Resta_, May 31 2013

%e With n=3 there are 7 vectors with sum bigger than 3:

%e {1, 1, 1, 1, 1, 1}

%e {-1, 1, 1, 1, 1, 1}

%e {1, -1, 1, 1, 1, 1}

%e {1, 1, -1, 1, 1, 1}

%e {1, 1, 1, -1, 1, 1}

%e {1, 1, 1, 1, -1, 1}

%e {1, 1, 1, 1, 1, -1}

%e So a(3) = 7.

%p A226197 := proc(n)

%p add( A094527(n,k),k=1+floor(n/2)..n) ;

%p end proc: # _R. J. Mathar_, Jun 04 2013

%t a[n_] := Sum[(2*n)!/((n-k)!*(n+k)!), {k, 1 + Floor[n/2], n}]; Array[a,30] (* _Giovanni Resta_, May 31 2013 *)

%o (C)

%o #include <stdio.h>

%o long long count, n;

%o void addOne(long long sum, long long added) {

%o if (added==n*2) {

%o if (sum>n) ++count;

%o return;

%o }

%o ++added;

%o addOne(sum+1, added);

%o addOne(sum-1, added);

%o }

%o int main() {

%o for (n=1; n<99; n++) {

%o count = 0;

%o addOne(0, 0);

%o printf("%llu, ", count);

%o }

%o return 0;

%o }

%K nonn

%O 1,3

%A _Alex Ratushnyak_, May 31 2013

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 19 16:08 EDT 2024. Contains 371794 sequences. (Running on oeis4.)