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.

A120304 Catalan numbers minus 2.

Original entry on oeis.org

-1, -1, 0, 3, 12, 40, 130, 427, 1428, 4860, 16794, 58784, 208010, 742898, 2674438, 9694843, 35357668, 129644788, 477638698, 1767263188, 6564120418, 24466267018, 91482563638, 343059613648, 1289904147322, 4861946401450, 18367353072150, 69533550916002, 263747951750358
Offset: 0

Views

Author

Alexander Adamchuk, Jul 13 2006

Keywords

Comments

Prime p divides a(p). Prime p divides a(p+1) for p > 2. Prime p divides a((p-1)/2) for p = 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, ... = A002144(n) except 5. Pythagorean primes: primes of form 4n+1. Also A002313(n) except 2, 5. Primes congruent to 1 or 2 modulo 4; or, primes of form x^2+y^2; or, -1 is a square mod p. p^2 divides a(p^2) and a(p^2+1) for all prime p.
For n >= 2, number of Dyck paths of semilength n such that all four consecutive step patterns of length 2 occur at least once; a(3)=3: UDUUDD, UUDDUD, UUDUDD. For each n two paths do not satisfy the condition: U^{n}D^{n} and (UD)^n. - Alois P. Heinz, Jun 13 2014

Crossrefs

Programs

  • Maple
    a:= n-> binomial(2*n, n)/(n+1) -2:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jun 13 2014
  • Mathematica
    Table[(2n)!/n!/(n+1)!-2,{n,0,30}]
    CatalanNumber[Range[0,30]]-2 (* Harvey P. Dale, May 03 2019 *)
  • MuPAD
    combinat::dyckWords::count(n)-2 $ n = 0..38; // Zerinvary Lajos, May 08 2008
    
  • PARI
    a(n) = binomial(2*n, n)/(n+1)-2; \\ Altug Alkan, Dec 17 2017

Formula

a(n) = A000108(n) - 2.
a(n) = (2n)!/(n!*(n+1)!) - 2.
(n+1)*a(n) + 2*(-3*n+1)*a(n-1) + (9*n-13)*a(n-2) + 2*(-2*n+5)*a(n-3) = 0. - R. J. Mathar, May 30 2014