cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A226197 #14 May 10 2014 09:51:48
%S A226197 1,1,7,9,56,79,470,697,4048,6196,35443,55455,313912,499178,2804012,
%T A226197 4514873,25211936,40999516,227881004,373585604,2068564064,3414035527,
%U A226197 18844224462,31278197839,172186125456,287191809724,1577401391626,2642070371194,14483100716176,24347999094724
%N A226197 Numbers of vectors with 2*n integers such that each element is either 1 or -1, and their sum > n.
%F A226197 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 A226197 With n=3 there are 7 vectors with sum bigger than 3:
%e A226197 {1, 1, 1, 1, 1, 1}
%e A226197 {-1, 1, 1, 1, 1, 1}
%e A226197 {1, -1, 1, 1, 1, 1}
%e A226197 {1, 1, -1, 1, 1, 1}
%e A226197 {1, 1, 1, -1, 1, 1}
%e A226197 {1, 1, 1, 1, -1, 1}
%e A226197 {1, 1, 1, 1, 1, -1}
%e A226197 So a(3) = 7.
%p A226197 A226197 := proc(n)
%p A226197     add( A094527(n,k),k=1+floor(n/2)..n) ;
%p A226197 end proc: # _R. J. Mathar_, Jun 04 2013
%t A226197 a[n_] := Sum[(2*n)!/((n-k)!*(n+k)!), {k, 1 + Floor[n/2], n}]; Array[a,30] (* _Giovanni Resta_, May 31 2013 *)
%o A226197 (C)
%o A226197 #include <stdio.h>
%o A226197 long long count, n;
%o A226197 void addOne(long long sum, long long added) {
%o A226197   if (added==n*2) {
%o A226197     if (sum>n) ++count;
%o A226197     return;
%o A226197   }
%o A226197   ++added;
%o A226197   addOne(sum+1, added);
%o A226197   addOne(sum-1, added);
%o A226197 }
%o A226197 int main() {
%o A226197   for (n=1; n<99; n++) {
%o A226197     count = 0;
%o A226197     addOne(0, 0);
%o A226197     printf("%llu, ", count);
%o A226197   }
%o A226197   return 0;
%o A226197 }
%K A226197 nonn
%O A226197 1,3
%A A226197 _Alex Ratushnyak_, May 31 2013