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.

Showing 1-3 of 3 results.

A110609 a(n) = n * binomial(2*n, n-1).

Original entry on oeis.org

0, 1, 8, 45, 224, 1050, 4752, 21021, 91520, 393822, 1679600, 7113106, 29953728, 125550100, 524190240, 2181340125, 9051563520, 37467344310, 154754938800, 637982011590, 2625648168000, 10789623755820, 44277560801760, 181478535620850, 742984788858624, 3038716500907500
Offset: 0

Views

Author

Paul Barry, Jul 30 2005

Keywords

Crossrefs

Column k=1 of A110608.

Programs

  • Magma
    [0] cat [((4*n+4)*(2*n+1)*Binomial(2*n, n)/(n+2))/2: n in [0..25]]; // Vincenzo Librandi, Jan 09 2015
    
  • Maple
    with(combinat):with(combstruct):a[0]:=0:for n from 1 to 30 do a[n]:=sum((count(Composition(n*2+1),size=n)),j=1..n) od: seq(a[n], n=0..22); # Zerinvary Lajos, May 09 2007
    a:=n->sum(sum(binomial(2*n,n)/(n+1), j=1..n),k=1..n): seq(a(n), n=0..22); # Zerinvary Lajos, May 09 2007
    series(simplify(x*diff(x*diff((1-sqrt(1-4*x))/(2*x), x), x)), x, 20):
    seq(coeff(%, x, k), k=0..18); # Karol A. Penson, Apr 25 2025
  • Mathematica
    Table[CatalanNumber[n]*n^2, {n, 0, 22}] (* Zerinvary Lajos, Jul 08 2009 *)
    CoefficientList[Series[x (1 / x^2 - (1 - 6 x + 4 x^2) / ((1 - 4 x)^(3/2) x^2)) / 2, {x, 0, 30}], x] (* Vincenzo Librandi, Jan 09 2015 *)
  • PARI
    for(n=0,25, print1(n*binomial(2*n,n-1), ", ")) \\ G. C. Greubel, Sep 01 2017

Formula

a(n) = n^2*binomial(2*n, n)/(n+1) = n^2*A000108(n) = A002736(n)/(n+1).
G.f.: -(2*x*(2*x+2*sqrt(1-4*x)-3) - sqrt(1-4*x) + 1)/(2*sqrt((1 - 4*x)^3)*x). - Marco A. Cisneros Guevara, Jul 23 2011; amended by Georg Fischer, Apr 09 2020
(n+1)*(10*n-7)*a(n)+2*n*(5*n-88)*a(n-1) -4*(25*n-22)*(2*n-3)*a(n-2)=0. - R. J. Mathar, Nov 07 2012
From Ilya Gutkovskiy, Jan 20 2017: (Start)
E.g.f.: x*(BesselI(0,2*x) + 2*BesselI(1,2*x) + BesselI(2,2*x))*exp(2*x).
a(n) ~ 4^n*sqrt(n)/sqrt(Pi).
Sum_{n>=1} 1/a(n) = Pi*(2*sqrt(3) + Pi)/18 = 1.152911143694148... (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (2/sqrt(5))*log(phi) + 2*log(phi)^2, where log(phi) = A002390. - Amiram Eldar, Feb 20 2021
G.f.: (x*(d/dx))^2 [g.f. of A000108]. - Karol A. Penson, Apr 25 2025

A351585 Triangle read by rows: T(n,k) = A(k,n-k), 1 <= k < n, 2 <= n, where A(m,n) is the number of distinct strings consisting of one X, m+n-1 Y's and m+n-1 Z's in which the X lies to the right of at least m Y's and at least m Z's.

Original entry on oeis.org

2, 16, 6, 90, 52, 20, 448, 306, 180, 70, 2100, 1568, 1086, 644, 252, 9504, 7500, 5664, 3948, 2352, 924, 42042, 34452, 27450, 20840, 14580, 8712, 3432, 183040, 154154, 127380, 101950, 77640, 54450, 32604, 12870, 787644, 677248, 574574, 476652, 382510, 291896, 205062, 122980, 48620
Offset: 2

Views

Author

Christopher J. Fewster, Feb 14 2022

Keywords

Comments

The general string enumeration problem of counting strings with k+k'-1 X's, m+m' Y's and n+n' Z's in which the k'th X is placed after at least m of the Y's and n of the Z's may be expressed in terms of an integral of incomplete Beta functions and evaluated in terms of Kampe de Feriet functions (see Connor & Fewster, 2022). Other special cases include A351583 and A351584.

Examples

			Triangle starts:
     2;
    16,    6;
    90,   52,   20;
   448,  306,  180,  70;
  2100, 1568, 1086, 644, 252;
  ...
		

Crossrefs

Programs

  • Maple
    T:=(n,k)->(n - k)*binomial(2*n - 1, n) - 2*k*(n - k)*binomial(2*k - 1, k)*binomial(2*n - 2*k - 1, n - k)/n; [seq(seq(T(n,k),k=1..n-1),n=2..10)];
  • Mathematica
    t[n_,k_]:=(n-k)*Binomial[2*n-1,n]-(2*k*(n-k)/n)*Binomial[2*k-1,k]*Binomial[2*(n-k)-1,n-k]; Table[t[n,k],{n,2,10},{k,1,n-1}]

Formula

T(n+2,1) = A(1,n) = 2*n*binomial(2*n,n-1) = A253487(n-1).
T(m+1,m) = A(m,1) = binomial(2*m,m) = A000984(m) [central binomial coefficients].
T(n,k) = (n - k)*binomial(2*n - 1, n) - 2*k*(n - k)*binomial(2*k - 1, k)*binomial(2*n - 2*k - 1, n - k)/n. See Connor & Fewster (2022).

A380119 Triangle read by rows: T(n, k) is the number of walks of length 2*n on the N X N grid with unit steps in all four directions (NSWE) starting at (0, 0). k is the common value of the x- and the y-coordinate of the endpoint of the walk.

Original entry on oeis.org

1, 2, 2, 10, 16, 6, 70, 140, 90, 20, 588, 1344, 1134, 448, 70, 5544, 13860, 13860, 7392, 2100, 252, 56628, 151008, 169884, 109824, 42900, 9504, 924, 613470, 1717716, 2108106, 1561560, 750750, 231660, 42042, 3432, 6952660, 20225920, 26546520, 21781760, 12155000, 4667520, 1191190, 183040, 12870
Offset: 0

Views

Author

Peter Luschny, Jan 19 2025

Keywords

Examples

			The triangle starts:
  [0] [      1]
  [1] [      2,        2]
  [2] [     10,       16,        6]
  [3] [     70,      140,       90,      20]
  [4] [    588,     1344,     1134,      448,       70]
  [5] [   5544,    13860,    13860,     7392,     2100,     252]
  [6] [  56628,   151008,   169884,   109824,    42900,    9504,     924]
  [7] [ 613470,  1717716,  2108106,  1561560,   750750,  231660,   42042,   3432]
  [8] [6952660, 20225920, 26546520, 21781760, 12155000, 4667520, 1191190, 183040, 12870]
.
For n = 2 the walks depending on the x-coordinate of the endpoint are:
W(x=0) = {NNSS,NSNS,NSWE,NWSE,NWES,WNSE,WNES,WWEE,WENS,WEWE},
W(x=1) = {NNSW,NNWS,NSNW,NSWN,NWNS,NWSN,NWWE,NWEW,WNNS,WNSN,WNWE,WNEW,WWNE,WWEN,WENW,WEWN},
W(x=2) = {NNWW,NWNW,NWWN,WNNW,WNWN,WWNN}.
		

Crossrefs

Related triangles: A380120.
Cf. A005568 (column 0), A000984 (main diagonal), A253487 (sub diagonal), A151403 (row sums).

Programs

  • Python
    from dataclasses import dataclass
    @dataclass
    class Walk: s: str = ""; x: int = 0; y: int = 0
    def Trow(n: int) -> list[int]:
        W = [Walk()]
        row = [0] * (n + 1)
        for w in W:
            if len(w.s) == 2*n:
                if w.x == w.y: row[w.y] += 1
            else:
                for s in "NSWE":
                    x = y = 0
                    match s:
                        case "W": x =  1
                        case "E": x = -1
                        case "N": y =  1
                        case "S": y = -1
                        case _  : pass
                    if (w.y + y >= 0) and (w.x + x >= 0):
                        W.append(Walk(w.s + s, w.x + x, w.y + y))
        return row
    for n in range(6): print(Trow(n))
Showing 1-3 of 3 results.