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-10 of 11 results. Next

A154413 a(n) = A006551(n) - A018224(n).

Original entry on oeis.org

0, 0, 0, 2, 30, 202, 2016, 14394, 151290, 1294478, 15660744, 162298842, 2274318228, 27968231436, 447527038848, 6382757516250, 114890215021650, 1865385066804550, 37307710791708600, 679562209260462054
Offset: 0

Views

Author

Roger L. Bagula, Jan 09 2009

Keywords

Crossrefs

Programs

  • Mathematica
    t[n_, k_] = Sum[(-1)^j Binomial[n + 1, j](k + 1 - j)^n, {j, 0, k + 1}];
    a0 = Table[t[n, Floor[n/2]], {n, 1, 30}];
    b0 = Table[Binomial[n, Floor[(n)/2]]^2, {n, 0, 29}];
    a=a0-b0

Formula

a(n) = Eulerian[n,Floor[n/2]] - Binomial[n,Floor[n/2]]^2.

A088855 Triangle read by rows: number of symmetric Dyck paths of semilength n with k peaks.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 4, 2, 1, 1, 3, 6, 6, 3, 1, 1, 3, 9, 9, 9, 3, 1, 1, 4, 12, 18, 18, 12, 4, 1, 1, 4, 16, 24, 36, 24, 16, 4, 1, 1, 5, 20, 40, 60, 60, 40, 20, 5, 1, 1, 5, 25, 50, 100, 100, 100, 50, 25, 5, 1, 1, 6, 30, 75, 150, 200, 200, 150, 75, 30, 6, 1, 1, 6, 36, 90, 225, 300, 400, 300, 225, 90, 36, 6, 1
Offset: 1

Views

Author

Emeric Deutsch, Nov 24 2003

Keywords

Comments

Rows 2, 4, 6, ... give A088459.
Diagonal sums are in A088518(n-1). - Philippe Deléham, Jan 04 2009
Row sums are in A001405(n). - Philippe Deléham, Jan 04 2009
Subtriangle (1 <= k <= n) of triangle T(n,k), 0 <= k <= n, read by rows, given by A101455 DELTA A056594 := [0,1,0,-1,0,1,0,-1,0,1,0,-1,0,...] DELTA [1,0,-1,0,1,0,-1,0,1,0,-1,0,1,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 03 2009
Also, number of symmetric noncrossing partitions of an n-set with k blocks. - Andrew Howroyd, Nov 15 2017
From Roger Ford, Oct 17 2018: (Start)
T(n,k) = t(n+2,d) where t(n,d) is the number of different semi-meander arch depth listings with n top arches and with d the depth of the deepest embedded arch.
Examples: /\ semi-meander with 5 top arches
//\\ /\ 2 arches are at depth=0 (no covering arches)
///\\\ //\\ 2 arches are at depth=1 (1 covering arch)
(0)(1)(2) 1 arch is at depth=2 (2 covering arches)
2, 2, 1 is the listing for this t(5,2)
/\ semi-meander with 5 top arches
/ \ (0)(1)
/\ /\ //\/\\ 3, 2 is the listing for this t(5,1)
a(6,5) = t(8,5)= 3 {2,1,1,1,2,1; 2,1,2,1,1,1; 3,1,1,1,1,1} (End)

Examples

			Triangle begins:
  1;
  1,  1;
  1,  1,  1;
  1,  2,  2,   1;
  1,  2,  4,   2,   1;
  1,  3,  6,   6,   3,    1;
  1,  3,  9,   9,   9,    3,    1;
  1,  4, 12,  18,  18,   12,    4,    1;
  1,  4, 16,  24,  36,   24,   16,    4,    1;
  1,  5, 20,  40,  60,   60,   40,   20,    5,    1;
  1,  5, 25,  50, 100,  100,  100,   50,   25,    5,    1;
  1,  6, 30,  75, 150,  200,  200,  150,   75,   30,    6,   1;
  1,  6, 36,  90, 225,  300,  400,  300,  225,   90,   36,   6,   1;
  1,  7, 42, 126, 315,  525,  700,  700,  525,  315,  126,  42,   7,  1;
  1,  7, 49, 147, 441,  735, 1225, 1225, 1225,  735,  441, 147,  49,  7, 1;
  1,  8, 56, 196, 588, 1176, 1960, 2450, 2450, 1960, 1176, 588, 196, 56, 8, 1;
  ...
a(6,2)=3 because we have UUUDDDUUUDDD, UUUUDDUUDDDD, UUUUUDUDDDDD, where
U=(1,1), D=(1,-1).
		

Crossrefs

Cf. A001405 (row sums), A088459, A088518 (diagonal sums).
Column 2 is A008619, column 3 is A002620, column 4 is A028724, column 5 is A028723, column 6 is A028725, column 7 is A331574.

Programs

  • Magma
    [(&*[Binomial(Floor((n-j)/2), Floor((k-j)/2)): j in [0..1]]): k in [1..n], n in [1..15]]; // G. C. Greubel, Apr 08 2022
    
  • Mathematica
    T[n_, k_] := Binomial[Quotient[n-1, 2], Quotient[k-1, 2]]*Binomial[ Quotient[n, 2], Quotient[k, 2]];
    Table[T[n, k], {n,13}, {k,n}]//Flatten (* Jean-François Alcover, Jun 07 2018 *)
  • PARI
    T(n,k) = binomial((n-1)\2, (k-1)\2)*binomial(n\2, k\2); \\ Andrew Howroyd, Nov 15 2017
    
  • Sage
    def A088855(n,k): return product(binomial( (n-j)//2, (k-j)//2 ) for j in (0..1))
    flatten([[A088855(n,k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Apr 08 2022

Formula

T(n, k) = binomial(floor(n'), floor(k'))*binomial(ceiling(n'), ceiling(k')), where n' = (n-1)/2, k' = (k-1)/2.
G.f.: 2*u/(u*v + sqrt(x*y*u*v)) - 1, where x = 1+z+t*z, y = 1+z-t*z, u = 1-z+t*z, v = 1-z-t*z.
Triangle T(n,k), 0 <= k <= n, given by A101455 DELTA A056594 begins: 1; 0,1; 0,1,1; 0,1,1,1; 0,1,2,2,1; 0,1,2,4,2,1; 0,1,3,6,6,3,1; 0,1,3,9,9,9,3,1; ... - Philippe Deléham, Jan 03 2009
From G. C. Greubel, Apr 08 2022: (Start)
T(n, n-k+1) = T(n, k).
T(2*n-1, n) = A018224(n-1), n >= 1.
T(2*n, n) = A005566(n-1), n >= 1. (End)

Extensions

Keyword:tabl added Philippe Deléham, Jan 25 2010

A060149 Number of homogeneous generators of degree n for graded algebra associated with meanders.

Original entry on oeis.org

1, 3, 2, 13, 16, 106, 166, 1073, 1934, 12142, 24076, 147090, 312906, 1865772, 4191822, 24463905, 57433950, 328887346, 800740450, 4508608610, 11319707546, 62781858592, 161841539812, 885513974674, 2335765140994, 12624162072740, 33979681977530, 181611275997040
Offset: 1

Views

Author

N. J. A. Sloane, Apr 10 2001

Keywords

Crossrefs

Meander sequences in Bacher's paper: A005315, A060066, A060089, A060111, A060148, A060149, A060174, A060198, A060206.
Cf. A018224.

Programs

  • PARI
    seq(n) = Vec(1 - 1/sum(k=0, n, binomial(k, k\2)^2*x^k, O(x*x^n))) \\ Andrew Howroyd, Feb 07 2025

Formula

G.f.: 1 - 1/B(x) where B(x) is the g.f. of A018224. - Andrew Howroyd, Feb 07 2025

Extensions

a(11) onwards from Andrew Howroyd, Feb 07 2025

A360859 Triangle read by rows. T(n, k) = binomial(n, ceil(k/2)) * binomial(n, floor(k/2)).

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 1, 3, 9, 9, 1, 4, 16, 24, 36, 1, 5, 25, 50, 100, 100, 1, 6, 36, 90, 225, 300, 400, 1, 7, 49, 147, 441, 735, 1225, 1225, 1, 8, 64, 224, 784, 1568, 3136, 3920, 4900, 1, 9, 81, 324, 1296, 3024, 7056, 10584, 15876, 15876, 1, 10, 100, 450, 2025, 5400, 14400, 25200, 44100, 52920, 63504
Offset: 0

Views

Author

Peter Luschny, Feb 28 2023

Keywords

Examples

			Triangle T(n, k) starts:
[0] 1;
[1] 1, 1;
[2] 1, 2,  4;
[3] 1, 3,  9,   9;
[4] 1, 4, 16,  24,   36;
[5] 1, 5, 25,  50,  100,  100;
[6] 1, 6, 36,  90,  225,  300,  400;
[7] 1, 7, 49, 147,  441,  735, 1225,  1225;
[8] 1, 8, 64, 224,  784, 1568, 3136,  3920,  4900;
[9] 1, 9, 81, 324, 1296, 3024, 7056, 10584, 15876, 15876;
		

Crossrefs

Cf. A018224 (main diagonal), A360861 (row sums).

Programs

  • Maple
    A360859 := (n, k) -> binomial(n, ceil(k/2)) * binomial(n, floor(k/2)):
    seq(seq(A360859(n, k), k = 0..n), n = 0..10);
  • Python
    from math import comb
    def A360859_T(n,k): return comb(n,m:=k>>1)**2*(n-m)//(m+1) if k&1 else comb(n,k>>1)**2 # Chai Wah Wu, Feb 28 2023

A113182 Number of unrooted two-vertex (or, dually, two-face) regular planar maps of valency n considered up to orientation-preserving homeomorphism.

Original entry on oeis.org

1, 1, 2, 3, 7, 14, 39, 95, 308, 859, 3013, 9130, 33300, 106039, 394340, 1297295, 4878109, 16428300, 62232321, 213388961, 812825244, 2827645453, 10818489817, 38086408002, 146250545528, 520062618300, 2003199281223, 7184570776213
Offset: 1

Views

Author

Valery A. Liskovets, Oct 19 2005

Keywords

Comments

Bisections are A112944 and A113181.

Crossrefs

Programs

  • Mathematica
    a[n_] := If[OddQ[n], (1/(2n))(Sum[EulerPhi[d] Binomial[2 Floor[(n-1)/(2d)], Floor[(n-1)/(2d)]]^2, {d, Divisors[n]}] + n Binomial[n-1, (n-1)/2]), (1/4)((2 Sum[EulerPhi[d] Binomial[n/d-1, Floor[n/(2d)]]^2, {d, Divisors[ n]}])/n + Binomial[n, n/2])];
    Array[a, 28] (* Jean-François Alcover, Aug 30 2019 *)

A378061 Triangle read by rows: T(n, k) = binomial(n + 1, (n - k)/2)^2*(k + 1)/(n + 1) if n - k is even, otherwise 0.

Original entry on oeis.org

1, 0, 1, 3, 0, 1, 0, 8, 0, 1, 20, 0, 15, 0, 1, 0, 75, 0, 24, 0, 1, 175, 0, 189, 0, 35, 0, 1, 0, 784, 0, 392, 0, 48, 0, 1, 1764, 0, 2352, 0, 720, 0, 63, 0, 1, 0, 8820, 0, 5760, 0, 1215, 0, 80, 0, 1, 19404, 0, 29700, 0, 12375, 0, 1925, 0, 99, 0, 1
Offset: 0

Views

Author

Peter Luschny, Dec 07 2024

Keywords

Comments

Consider square lattice walks with unit steps in all four directions (NSWE), starting at the origin, ending on the y-axis, and never going below the x-axis. T(n, k) is the number of walks with length n and height k. The number of walks with positive height is A378060, and with nonnegative height is A018224. Walks of odd length can never have an even height, and walks of even length cannot have an odd height. The Python program below generates the walks.

Examples

			Triangle starts:
  0  [   1]
  1  [   0,    1]
  2  [   3,    0,    1]
  3  [   0,    8,    0,    1]
  4  [  20,    0,   15,    0,   1]
  5  [   0,   75,    0,   24,   0,    1]
  6  [ 175,    0,  189,    0,  35,    0,  1]
  7  [   0,  784,    0,  392,   0,   48,  0,  1]
  8  [1764,    0, 2352,    0, 720,    0, 63,  0, 1]
  9  [   0, 8820,    0, 5760,   0, 1215,  0, 80, 0, 1]
.
The 15 walks with length 4 and height 2 are: 'NNNS', 'NNSN', 'NNWE', 'NNEW', 'NSNN', 'NWNE', 'NWEN', 'NENW', 'NEWN', 'WNNE', 'WNEN', 'WENN', 'ENNW', 'ENWN', 'EWNN'.
		

Crossrefs

The columns are aerated rows of A378062. See also: A000891, A145600, A145601, A145602, A145603.
Cf. A018224 (row sums), A378060.

Programs

  • Maple
    T := (n, k) -> ifelse((n - k)::odd, 0, binomial(n+1, (n-k)/2)^2*(k+1)/(n+1)):
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
  • Mathematica
    T[n_, k_] := If[EvenQ[n-k],Binomial[n + 1, (n - k)/2]^2*(k + 1)/(n + 1), 0]; Table[T[n,k],{n,0,10},{k,0,n}]//Flatten (* Stefano Spezia, Dec 08 2024 *)
  • Python
    # Creates the table by counting the heights of square lattice walks. For illustration only.
    from dataclasses import dataclass
    @dataclass
    class Z: w: str = ""; r: int = 0; i: int = 0
    def Trow(n: int) -> list[int]:
        W = [Z()]
        row = [0] * (n + 1)
        for x in W:
            if len(x.w) == n:
                if x.r == 0: row[x.i] += 1
            else:
                for s in "NSWE":
                    r = i = 0
                    match s:
                        case "W": r = 1
                        case "E": r = -1
                        case "N": i = 1
                        case "S": i = -1
                    if x.i + i >= 0:
                        W.append(Z(x.w + s, x.r + r, x.i + i))
        return row
    for n in range(10): print(f"[{n}] {Trow(n)}")

A378067 Triangle read by rows: T(n, k) is the number of walks of length n with unit steps in all four directions (NSWE) starting at (0, 0), staying in the upper plane (y >= 0), and ending on the vertical line x = 0 if k = 0, or on the line x = k or x = -(n + 1 - k) if k > 0.

Original entry on oeis.org

1, 1, 2, 4, 3, 3, 9, 10, 6, 10, 36, 25, 20, 20, 25, 100, 101, 55, 50, 55, 101, 400, 301, 231, 126, 126, 231, 301, 1225, 1226, 742, 490, 294, 490, 742, 1226, 4900, 3921, 3144, 1632, 1008, 1008, 1632, 3144, 3921, 15876, 15877, 10593, 7137, 3348, 2592, 3348, 7137, 10593, 15877
Offset: 0

Views

Author

Peter Luschny, Dec 08 2024

Keywords

Examples

			Triangle starts:
  [0] [    1]
  [1] [    1,     2]
  [2] [    4,     3,     3]
  [3] [    9,    10,     6,   10]
  [4] [   36,    25,    20,   20,   25]
  [5] [  100,   101,    55,   50,   55,  101]
  [6] [  400,   301,   231,  126,  126,  231,  301]
  [7] [ 1225,  1226,   742,  490,  294,  490,  742, 1226]
  [8] [ 4900,  3921,  3144, 1632, 1008, 1008, 1632, 3144,  3921]
  [9] [15876, 15877, 10593, 7137, 3348, 2592, 3348, 7137, 10593, 15877]
.
For n = 3 we get the walks depending on the x-coordinate of the endpoint:
W(x= 3) = {WWW},
W(x= 2) = {NWW,WNW,WWN},
W(x= 1) = {NNW,NSW,NWN,NWS,WWE,WEW,EWW,WNN,WNS},
W(x= 0) = {NNN,NNS,NSN,NWE,NEW,WNE,WEN,ENW,EWN},
W(x=-1) = {NNE,NEN,ENN,NSE,NES,WEE,ENS,EWE,EEW},
W(x=-2) = {NEE,ENE,EEN},
W(x=-3) = {EEE}.
T(3, 0) = card(W(x=0)) = 9, T(3, 1) = card(W(x=1)) + card(W(x=-3)) = 10,
T(3, 2) = card(W(x=2)) + card(W(x=-2)) = 6, T(3, 3) = card(W(x=3)) + card(W(x=-1)) = 10.
		

Crossrefs

Related triangles: A052174 (first quadrant), this triangle (upper plane), A379822 (whole plane).
Cf. A018224 (column 0), A001700 (row sums), A378069 (row sum without column 0), A380121 (row minimum).

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) == n:
                row[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
                    if w.y + y >= 0:
                        W.append(Walk(w.s + s, w.x + x, w.y + y))
        return row
    for n in range(10): print(Trow(n))

Formula

Sum_{k=1..n} T(n, k) = 2 * A378069(n).

A360861 a(n) = Sum_{k=0..n} binomial(n, ceiling(k/2)) * binomial(n, floor(k/2)).

Original entry on oeis.org

1, 2, 7, 22, 81, 281, 1058, 3830, 14605, 54127, 208110, 782761, 3027038, 11501478, 44668692, 170974710, 666220005, 2564271875, 10018268150, 38728479647, 151631858378, 588229029258, 2307174835212, 8975958379817, 35258881445606, 137501193282026, 540821096592028
Offset: 0

Views

Author

Peter Luschny, Feb 28 2023

Keywords

Crossrefs

Row sums of A360859.

Programs

  • Mathematica
    A360861[n_]:=(Binomial[2n+1,n]+Binomial[n,Floor[n/2]]^2)/2;
    Array[A360861,30,0] (* Paolo Xausa, Dec 11 2023 *)
  • Maxima
    a(n):=(1/2)*(binomial(2*n+1,n)+(binomial(n,floor(n/2)))^2); /* Tani Akinari, Jul 12 2023 */
  • Python
    from math import comb
    def A360861(n): return sum(comb(n,m:=k>>1)**2*(n-m)//(m+1) for k in range(1,n+1,2)) + sum(comb(n,k>>1)**2 for k in range(0,n+1,2)) # Chai Wah Wu, Feb 28 2023
    

Formula

a(n) = (1/2)*(binomial(2*n+1,n)+binomial(n,floor(n/2))^2). - Tani Akinari, Jul 12 2023

A302182 Number of 3D walks of type abc.

Original entry on oeis.org

1, 1, 5, 12, 62, 200, 1065, 3990, 21714, 89082, 492366, 2147376, 12004740, 54718092, 308559537, 1454116950, 8255788970, 39935276810, 227976044010, 1126178350440, 6457854821340, 32456552441040, 186814834574550, 952569927106980, 5500292590186380, 28391993275117500
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2018

Keywords

Comments

See Dershowitz (2017) for precise definition.

Crossrefs

Programs

  • Python
    from math import comb as binomial
    def row(n: int) -> list[int]:
        return sum(binomial(n, k)*binomial(k, k//2)//(k//2+1)*((k+1) %2)*binomial(n-k, (n-k)//2)**2 for k in range(n+1))
    for n in range(26): print(row(n)) # Mélika Tebni, Nov 27 2024

Formula

From Mélika Tebni, Nov 27 2024: (Start)
a(n) = Sum_{k=0..n} binomial(n, k)*A126120(k)*A018224(n-k).
a(2*n+1) = A135394(n) / (2*n+2).
a(2*n) = A302181(n). (End)

Extensions

a(13)-a(25) from Mélika Tebni, Nov 27 2024

A138354 Central moment sequence of tr(A^4) in USp(4).

Original entry on oeis.org

1, 0, 3, 1, 21, 26, 215, 498, 2821, 9040, 43695, 165375, 752785, 3101970, 13881803, 59837183, 267860685, 1184749704, 5337504263, 23996776941, 108964583121, 495544446410, 2267450194443, 10402298479276, 47926692348121
Offset: 0

Views

Author

Andrew V. Sutherland, Mar 16 2008, Mar 31 2008

Keywords

Comments

Binomial transform of A018224.
If A is a random matrix in the compact group USp(4) (4 X 4 complex are unitary and symplectic), then a(n)=E[(tr(A^4)+1)^n] is the n-th central moment of the trace of A^4, since E[tr(A^4)] = -1 (see A018224).

Examples

			a(3) = 1 because E[(tr(A^4)+1)^3] = 1.
a(3) = 1*A018224(0) + 3*A018224(1) + 3*A018224(2) + 1*A018224(1) = 1*1 + 3*(-1) + 3*4 + 1*(-9) = 1.
		

Crossrefs

Cf. A018224.

Programs

  • Mathematica
    a18224[n_] := Binomial[n, Floor[n/2]]^2;
    a[n_] := Sum[(-1)^i Binomial[n, i] a18224[i], {i, 0, n}];
    Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Aug 13 2018 *)

Formula

a(n) = (1/2)*Integral_{x=0..Pi,y=0..Pi}(2cos(4x)+2cos(4y)+1)^n*(2cos(x)-2cos(y))^2*(2/Pi*sin^2(x))*(2/Pi*sin^2(y))dxdy.
a(n) = Sum_{i=0..n} (-1)^i binomial(n,i)*A018224(i). [corrected by Jean-François Alcover, Aug 13 2018]
a(n) = (5*A201805(n) - A201805(n+1))/4. - Mark van Hoeij, Nov 29 2024
Showing 1-10 of 11 results. Next