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.

A110145 a(n) = Sum_{k=0..n} C(n,k)^2*mod(k,2).

Original entry on oeis.org

0, 1, 4, 10, 32, 126, 472, 1716, 6400, 24310, 92504, 352716, 1351616, 5200300, 20060016, 77558760, 300533760, 1166803110, 4537591960, 17672631900, 68923172032, 269128937220, 1052049834576, 4116715363800, 16123800489472, 63205303218876, 247959271674352
Offset: 0

Views

Author

Paul Barry, Jul 13 2005

Keywords

Comments

Interleaves A002458 and A037964.
Number of n-element subsets of [2n] having an odd sum. - Alois P. Heinz, Feb 06 2017

Crossrefs

Cf. A159916.

Programs

  • Mathematica
    Table[Sum[Binomial[n,k]^2 Mod[k,2],{k,0,n}],{n,0,30}] (* Harvey P. Dale, Feb 21 2013 *)
    Table[(Binomial[2 n, n] - Binomial[n, n/2] Cos[Pi n/2])/2, {n, 0, 30}] (* Vladimir Reshetnikov, Oct 04 2016 *)
  • PARI
    a(n) = sum(k=0, n, binomial(n, k)^2*(k % 2)); \\ Michel Marcus, Oct 05 2016

Formula

a(n) = Sum_{k=0..n} C(n, k)^2*(1-(-1)^k)/2.
a(n) = C(2n-1, n-1)(1-(-1)^n)/2+(C(2n, n)/2-(-1)^(n/2)*C(n, floor(n/2))/2)(1+(-1)^n)/2.
a(n) = (binomial(2*n, n) - binomial(n, n/2)*cos(Pi*n/2))/2 = n^2 * hypergeom([1/2-n/2, 1/2-n/2, 1-n/2, 1-n/2], [1, 3/2, 3/2], 1). - Vladimir Reshetnikov, Oct 04 2016
a(n) = A159916(2n,n). - Alois P. Heinz, Feb 06 2017