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.

A000846 a(n) = C(3n,n) - C(2n,n).

Original entry on oeis.org

0, 1, 9, 64, 425, 2751, 17640, 112848, 722601, 4638205, 29860259, 192831288, 1248973544, 8112024844, 52820112480, 344712308064, 2254247833257, 14768735480505, 96917273443305, 636948624057900, 4191706659276675, 27618897144488595, 182181063882796680
Offset: 0

Views

Author

Keywords

Comments

It appears that, with the exception of n = 49, a(n)== 1 (mod n^2) only if n is prime. (Tested to 10,000.) - Gary Detlefs, Aug 06 2013

Programs

  • Magma
    [Binomial(3*n,n)-Binomial(2*n,n): n in [0..30]]; // Vincenzo Librandi, Nov 12 2014
    
  • Maple
    seq(binomial(3*n,n)-binomial(2*n,n),n=0..10) ; # R. J. Mathar, May 05 2018
  • Mathematica
    Table[Binomial[3*n, n] - Binomial[2*n, n], {n, 0, 20}] (* T. D. Noe, Jun 20 2012 *)
  • Python
    from math import comb
    def A000846(n): return comb(3*n,n)-comb(n<<1,n) # Chai Wah Wu, Sep 07 2022

Formula

a(n) = Sum_{k = 1..n} binomial(n,k)*binomial(2*n,n-k). - Vladimir Kruchinin, Nov 12 2014
D-finite with recurrence 2*n*(n-1)*(2*n-1)*(11*n^2-33*n+24)*a(n) -(n-1) *(473*n^4 -1892*n^3 +2561*n^2 -1338*n +216) *a(n-1) +6 *(3*n-5) *(3*n-4) *(2*n-3) *(11*n^2-11*n+2) *a(n-2)=0. - R. J. Mathar, May 05 2018
a(n) = A005809(n) - A000984(n). - R. J. Mathar, Aug 14 2024