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.

A094780 Let 2^k = smallest power of 2 >= binomial(2n,n); a(n) = 2^k - binomial(2n,n).

This page as a plain text file.
%I A094780 #6 Nov 15 2019 06:05:49
%S A094780 0,0,2,12,58,4,100,664,3514,16916,77388,343144,1490148,6376616,
%T A094780 26992264,113317936,472661434,1961361076,8104733884,33374212936,
%U A094780 137031378124,11497939448,94924291832,562662294608,2936768405732,14326881917576,67031420473208,304860388037136
%N A094780 Let 2^k = smallest power of 2 >= binomial(2n,n); a(n) = 2^k - binomial(2n,n).
%C A094780 Suggested by reading the Knuth article.
%D A094780 D. E. Knuth, Efficient balanced codes, IEEE Trans. Inform. Theory, 32 (No. 1, 1986), 51-53.
%e A094780 C(30,15) = 155117520; 2^28 = 268435456; difference is 113317936.
%e A094780 k = 0, 1, 3, 5, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, ... - _R. J. Mathar_, Nov 15 2019
%p A094780 A094780 := proc(n)
%p A094780     local cb,k ;
%p A094780     cb := binomial(2*n,n) ;
%p A094780     k := ceil(log[2](cb)) ;
%p A094780     2^k-cb ;
%p A094780 end proc:
%p A094780 seq(A094780(n),n=0..10); # _R. J. Mathar_, Nov 15 2019
%Y A094780 Cf. A093387, A094779.
%K A094780 nonn
%O A094780 0,3
%A A094780 _N. J. A. Sloane_, Jun 10 2004