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.

Previous Showing 11-16 of 16 results.

A352626 a(n) = (n+1)*(3*n-2)*C(2*n,n-1)/(4*n-2).

Original entry on oeis.org

1, 8, 42, 200, 910, 4032, 17556, 75504, 321750, 1361360, 5727436, 23984688, 100053772, 416024000, 1725013800, 7135405920, 29452939110, 121347523440, 499132441500, 2050025300400, 8408638258020, 34448503964160, 140974630569240, 576340150932000, 2354075068866300
Offset: 1

Views

Author

Natalya Ter-Saakov, Mar 24 2022

Keywords

Comments

This is half the number of edges of the origami flip graph of the all-equal-angle single-vertex crease pattern of degree 2n.

Crossrefs

Number of vertices of the origami flip graph of the all-equal-angle single-vertex crease pattern of degree 2n is A162551.

Programs

  • Maple
    a:=n->(n+1)*(3*n-2)*binomial(2*n,n-1)/(4*n-2):
    seq(a(n),n=1..33);
  • Mathematica
    a[n_] := (n + 1)*(3*n - 2)*Binomial[2*n, n - 1]/(4*n - 2); Array[a, 25] (* Amiram Eldar, Mar 25 2022 *)
  • PARI
    a(n) = (n+1)*(3*n-2)*binomial(2*n,n-1)/(4*n-2); \\ Michel Marcus, Mar 25 2022

Formula

G.f.: x*(2*x+1)/(1-4*x)^(3/2).
D-finite with recurrence (-n+1)*a(n) +2*(n+2)*a(n-1) +4*(2*n-5)*a(n-2)=0. - R. J. Mathar, Mar 29 2022
a(n) = A002457(n-1)+2*A002457(n-2). - R. J. Mathar, Mar 29 2022

A380120 Triangle read by rows: T(n, k) is the number of walks of length n on the Z X Z grid with unit steps in all four directions (NSWE) starting at (0, 0). k is the absolute value of the x-coordinate of the endpoint of the walk.

Original entry on oeis.org

1, 2, 2, 6, 8, 2, 20, 30, 12, 2, 70, 112, 56, 16, 2, 252, 420, 240, 90, 20, 2, 924, 1584, 990, 440, 132, 24, 2, 3432, 6006, 4004, 2002, 728, 182, 28, 2, 12870, 22880, 16016, 8736, 3640, 1120, 240, 32, 2, 48620, 87516, 63648, 37128, 17136, 6120, 1632, 306, 36, 2
Offset: 0

Views

Author

Peter Luschny, Jan 17 2025

Keywords

Examples

			Triangle starts:
  [0] [    1]
  [1] [    2,     2]
  [2] [    6,     8,     2]
  [3] [   20,    30,    12,     2]
  [4] [   70,   112,    56,    16,     2]
  [5] [  252,   420,   240,    90,    20,    2]
  [6] [  924,  1584,   990,   440,   132,   24,    2]
  [7] [ 3432,  6006,  4004,  2002,   728,  182,   28,   2]
  [8] [12870, 22880, 16016,  8736,  3640, 1120,  240,  32,  2]
  [9] [48620, 87516, 63648, 37128, 17136, 6120, 1632, 306, 36, 2]
.
For n = 0 there is only the empty walk w = '' with start and end point (x=0, y=0).
For n = 3 the walks depending on the x-coordinate of the endpoint are:
W(x= 3) = {WWW},
W(x= 2) = {NWW,SWW,WNW,WSW,WWN,WWS},
W(x= 1) = {NNW,NSW,NWN,NWS,SNW,SSW,SWN,SWS,WNN,WNS,WSN,WSS,WWE,WEW,EWW},
W(x= 0) = {NNN,NNS,NSN,NSS,NWE,NEW,SNN,SNS,SSN,SSS,SWE,SEW,WNE,WSE,WEN,WES,ENW,ESW,EWN,EWS},
W(x=-1) = {NNE,NSE,NEN,NES,SNE,SSE,SEN,SES,WEE,ENN,ENS,ESN,ESS,EWE,EEW},
W(x=-2) = {NEE,SEE,ENE,ESE,EEN,EES},
W(x=-3) = {EEE}.
T(3, 0) = card(W(x=0)) = 20, T(3, 1) = card(W(x=1)) + card(W(x=-1)) = 30,
T(3, 2) = card(W(x=2)) + card(W(x=-2)) = 12, T(3, 3) = card(W(x=3)) + card(W(x=-3)) = 2.
		

Crossrefs

Related triangles: A052174 (N X N), A378067 (Z X N), A379822 (Z X Z, variant), A380119.
Cf. A000984 (column 0), A162551 (column 1), A006659 (column 2), A000302 (row sums), A068551 (row sum without column 0), A040000 (row minimum).

Programs

  • Maple
    T := (n, k) -> ifelse(k = 0, binomial(2*n, n - k), 2*binomial(2*n, n - k)):
    seq(print(seq(T(n, k), k = 0..n)), n = 0..9);
  • 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) == n:
                row[abs(w.x)] += 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
                    W.append(Walk(w.s + s, w.x + x, w.y + y))
        return row
    for n in range(10): print(Trow(n))

Formula

T(n, k) = binomial(2*n, n - k) if k = 0, otherwise 2*binomial(2*n, n - k).
Assuming the columns starting at n = 0, i.e. prepended by k zeros:
T(n, k) = [x^n] (2^(2*k+1)*x^k / (sqrt(1-4*x)*(1+sqrt(1-4*x))^(2*k))) for k >= 1.
T(n, k) = n! * [x^n] (2*BesselI(k, 2*x)*exp(2*x)) for k >= 1.

A217234 Triangle of expansion coefficients of the sum of an n X n array with equal top row and left column (extended by the rule of Pascal's triangle) in terms of the top row elements.

Original entry on oeis.org

1, 1, 4, 1, 12, 6, 1, 40, 20, 8, 1, 140, 70, 30, 10, 1, 504, 252, 112, 42, 12, 1, 1848, 924, 420, 168, 56, 14, 1, 6864, 3432, 1584, 660, 240, 72, 16, 1, 25740, 12870, 6006, 2574, 990, 330, 90, 18, 1, 97240, 48620, 22880, 10010, 4004, 1430, 440, 110, 20
Offset: 1

Views

Author

J. M. Bergot, Sep 28 2012

Keywords

Comments

Define a finite n X n square array with indeterminate elements A(1, c), c=1..n in the top row, the same elements A(r,1 ) = A(1,r) in the first column, r=1..n, and the remaining elements defined by the Pascal triangle rule: A(r,c) = A(r,c-1)+A(r-1,c).
The triangle T(n,m) gives the coefficients in the formula Sum_{r=1..n} Sum_{c=1..n} A(r,c) = Sum_{m=1..n} T(n,m) * A(1,m).
It says how many times the first, second, third, etc. element of the first row (or the first column) contributes to the sum of the n X n array.

Examples

			1;
1,4;
1,12,6;
1,40,20,8;
1,140,70,30,10;
1,504,252,112,42,12;
1,1848,924,420,168,56,14;
1,6864,3432,1584,660,240,72,16;
1,25740,12870,6006,2574,990,330,90,18;
1,97240,48620,22880,10010,4004,1430,440,110,20;
		

Crossrefs

Cf. A100320 (2nd column), A000984 (third column), A162551 (third column), A024483 (4th column), A006659 (5th column), A002058 (6th column), A030662 (row sums).

Programs

  • Maple
    A217234_row := proc(n)
        local A,r,c,s ;
        A := array({},1..n,1..n) ;
        for r from 2 to n do
            A[r,1] := A[1,r] ;
        end do:
        for r from 2 to n do
            for c from 2 to n do
                A[r,c] := A[r,c-1]+A[r-1,c] ;
            end do:
        end do:
        s := add(add( A[r,c],c=1..n) ,r=1..n) ;
        for c from 1 to n do
            printf("%d,", coeff(s,A[1,c]) ) ;
        end do:
        return ;
    end proc:
    for n from 1 to 10 do
        A217234_row(n) ;
        printf(";\n") ;
    end do; # R. J. Mathar, Oct 13 2012
  • Mathematica
    A217234row [n_] := Module[{A, x, r, c, s }, A = Array[x, {n, n}]; Do[A[[r, 1]] = A[[1, r]], {r, 2, n}]; Do[A[[r, c]] = A[[r, c - 1]] + A[[r - 1, c]], {r, 2, n}, {c, 2, n}]; s = Sum[A[[r, c]], {r, 1, n}, {c, 1, n}]; If[n == 1, {1}, List @@ s /. x[, ] -> 1]];
    Table[A217234row[n], {n, 1, 10}] // Flatten (* Jean-François Alcover, Nov 04 2023, after R. J. Mathar *)

Extensions

Edited by R. J. Mathar, Oct 13 2012
Typo in data corrected by Jean-François Alcover, Nov 04 2023

A239453 Convolution of the generalized Catalan numbers A057977 with themselves.

Original entry on oeis.org

1, 2, 3, 8, 11, 30, 43, 112, 172, 420, 694, 1584, 2809, 6006, 11379, 22880, 46088, 87516, 186562, 335920, 754646, 1293292, 3050238, 4992288, 12319816, 19315400, 49725004, 74884320, 200571541, 290845350, 808559299, 1131445440, 3257808976, 4407922860, 13119940234
Offset: 0

Views

Author

Peter Luschny, Mar 19 2014

Keywords

Crossrefs

Cf. A162551.

Programs

  • Sage
    def A239453_list(n):
        r = sqrt(1-4*x^2)
        g = lambda x: (1-r)*(r+x)/(2*x^2*r)
        s = taylor(g(x), x, 0, n+1)
        f = [s.coefficient(x, j) for j in (0..n+1)]
        return [add(f[k]*f[j-k] for k in (0..j)) for j in (0..n)]
    A239453_list(36)

Formula

D-finite with recurrence -(n+4)*(137*n-1035)*a(n) +(383*n^2-1622*n-5421)*a(n-1) +4*(274*n^2-1385*n-3534)*a(n-2) +4*(-766*n^2+4393*n+555)*a(n-3) +16*(-137*n^2+898*n-606)*a(n-4) +16*(n-3)*(383*n-1622)*a(n-5)=0. - R. J. Mathar, Feb 03 2025

A304202 a(n) = (2*n-3)*4^(n-1) - 2*binomial(2*n, n-1).

Original entry on oeis.org

18, 208, 1372, 7632, 39050, 190112, 895524, 4120528, 18629652, 83088096, 366560568, 1602837280, 6956911962, 30007067456, 128736063316, 549740689872, 2338025684540, 9907917740128, 41853370268424, 176294674155104, 740683257681988, 3104678088923328, 12986226585328232
Offset: 3

Views

Author

Vincenzo Librandi, May 08 2018

Keywords

Crossrefs

Programs

  • Magma
    [(2*n-3)*4^(n-1)-2*Binomial(2*n, n-1): n in [3..20]];
    
  • Mathematica
    Table[(2 n - 3) 4^(n - 1) - 2 Binomial[2 n, n - 1], {n, 3, 40}]
  • PARI
    a(n) = (2*n-3)*4^(n-1) - 2*binomial(2*n, n-1) \\ Charles R Greathouse IV, Oct 23 2023

Formula

E.g.f.: (3 + 12*x + 8*x^2 - 3*exp(4*x) + 8*exp(4*x)*x - 8*exp(2*x)*I_1(2*x) )/4, where I_1(.) is the modified Bessel function of the first kind. - Bruno Berselli, May 08 2018
(n+1)*(2*n^2-7*n+7)*a(n) - 2*n*(4*n-5)*(2*n-3)*a(n-1) + 8*(2*n-3)*(2*n^2-3*n+2)*a(n-2) = 0. - R. J. Mathar, May 08 2018

A337500 a(n) is the number of ballot sequences of length n tied or won by at most 3 votes.

Original entry on oeis.org

1, 2, 4, 8, 14, 30, 50, 112, 182, 420, 672, 1584, 2508, 6006, 9438, 22880, 35750, 87516, 136136, 335920, 520676, 1293292, 1998724, 4992288, 7696444, 19315400, 29716000, 74884320, 115000920, 290845350, 445962870
Offset: 0

Views

Author

Nachum Dershowitz, Aug 30 2020

Keywords

Comments

Also the number of n-step walks on a path graph ending within 3 steps of the origin.
Also the number of monotonic paths of length n ending within 3 steps of the diagonal.

Crossrefs

Bisections give A162551 (odd part, starting from second element), A051924 (even part).

Formula

a(n) = A337499(n) + (n mod 2)*A024483(floor((n+3)/2)).
Conjecture: D-finite with recurrence -(n+3)*(n-4)*a(n) +2*(n^2-2*n-11)*a(n-1) +4*(n-1)^2*a(n-2) -8*(n-1)*(n-2)*a(n-3)=0. - R. J. Mathar, Sep 27 2020
Previous Showing 11-16 of 16 results.