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.

User: David Galvin

David Galvin's wiki page.

David Galvin has authored 9 sequences.

A364580 Number of n-step self-avoiding walks on the square Manhattan lattice that do not take two consecutive turns.

Original entry on oeis.org

1, 2, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288, 460, 740, 1192, 1918, 3064, 4910, 7872, 12620, 20114, 32150, 51396, 82160, 130730, 208506, 332616, 530588, 843222, 1342662, 2138280, 3405346, 5406522, 8597632, 13674278, 21748530, 34501460, 54807754, 87077354
Offset: 0

Author

David Galvin, Jul 28 2023

Keywords

Comments

The square Manhattan lattice is an oriented square lattice in which the orientations are constant along horizontal and vertical lines, with pairs of consecutive lines having alternating orientations (similar to a generic portion of the streets and avenues of midtown Manhattan).
In the hard-core (independent set) model on the ordinary two-dimensional integer lattice, the contours separating odd-occupied regions from even-occupied regions can be viewed as self-avoiding walks on the square Manhattan lattice that do take two consecutive turns. It follows via a standard Peierls argument that if a(n) grows like mu^n then the hard-core model on the ordinary two-dimensional integer lattice exhibits phase coexistence for all values of the fugacity above mu^4-1. See the Blanca, Chen, Galvin, Randall and Tetali reference for details.
In the Blanca et al. reference these are called "taxi walks" because a savvy passenger in a Manhattan cab would be suspicious if the cab took two consecutive turns.

Examples

			With the x-axis and the y-axis both oriented positively, here are the 6 walks of length 3:
 * (0,0)-(1,0)-(2,0)-(3,0)
 * (0,0)-(1,0)-(2,0)-(2,1)
 * (0,0)-(1,0)-(1,-1)-(1,-2)
 * (0,0)-(0,1)-(0,2)-(0,3)
 * (0,0)-(0,1)-(0,2)-(1,2)
 * (0,0)-(0,1)-(-1,1)-(-2,1)
The following is not a valid walk, because it takes two consecutive turns:
 * (0,0)-(1,0)-(1,-1)-(0,-1)
		

References

  • A. Blanca, Y. Chen, D. Galvin, D. Randall and P. Tetali, Phase Coexistence for the Hard-Core Model on Z^2, Combinatorics, Probability and Computing, 28 (2019), 1-22.

Crossrefs

A117633 gives the number of self-avoiding walks on the square Manhattan lattice without the restriction on consecutive turns.

Formula

a(n) = f(n)*mu^n where mu is a constant and f(n) is subexponential in n. This follows from the subadditivity of log a(n). See the Blanca, Chen, Galvin, Randall and Tetali reference for details.
mu is known to lie between 1.5186 and 1.5874. See the Blanca et al. reference for the lower bound, and the Liang link for the upper bound.

A350746 Triangle read by rows: T(n,k) is the number of labeled quasi-loop-threshold graphs on vertex set [n] with k components, for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

2, 3, 4, 16, 18, 8, 133, 155, 72, 16, 1521, 1810, 910, 240, 32, 22184, 26797, 14145, 4180, 720, 64, 393681, 480879, 262514, 83230, 16520, 2016, 128, 8233803, 10144283, 5675866, 1888873, 409360, 58912, 5376, 256
Offset: 1

Author

David Galvin, Jan 13 2022

Keywords

Comments

The family of quasi-loop-threshold graphs is the smallest family of looped graphs that contains K_1 (a single vertex) and K^loop_1 (a single looped vertex), and is closed under taking unions and adding looped dominating vertices (looped, and adjacent to everything previously added).

Examples

			Triangle begins:
        2;
        3,        4;
       16,       18,       8;
      133,      155,      72,      16;
     1521,     1810,     910,     240,     32;
    22184,    26797,   14145,    4180,    720,    64;
   393681,   480879,  262514,   83230,  16520,  2016,  128;
  8233803, 10144283, 5675866, 1888873, 409360, 58912, 5376, 256;
  ...
		

Crossrefs

Row sums are A038052.
Except at n=1, the first column is A048802 (A048802 takes value 1 at n=1).

Programs

  • Mathematica
    qltconn[0] = 0; qltconn[1] = 2; qltconn[n_] := qltconn[n] = Sum[StirlingS2[n, k]*(k^(k - 1)), {k, 1, n}] (*qltconn is the number of connected quasi loop threshold graphs on n vertices*); T[n_, l_] := T[n, l] := (Factorial[n]/Factorial[l])*Coefficient[(Sum[(qltconn[k]*(x^k))/Factorial[k], {k, 1, n}])^l, x, n]; Table[T[n, l], {n, 1, 12}, {l, 1, n}]

Formula

See Section 1.4 of Galvin, Wesley and Zacovic link for two methods to compute T(n,k).

A350531 Triangle read by rows: T(n,k) is the number of labeled loop-threshold graphs on vertex set [n] with k components, for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

2, 3, 3, 13, 9, 4, 75, 52, 18, 5, 541, 375, 130, 30, 6, 4683, 3246, 1125, 260, 45, 7, 47293, 32781, 11361, 2625, 455, 63, 8, 545835, 378344, 131124, 30296, 5250, 728, 84, 9, 7087261, 4912515, 1702548, 393372, 68166, 9450, 1092, 108, 10
Offset: 1

Author

David Galvin, Jan 03 2022

Keywords

Comments

Loop-threshold graphs are constructed from either a single unlooped vertex or a single looped vertex by iteratively adding isolated vertices (adjacent to nothing previously added) and looped dominating vertices (looped, and adjacent to everything previously added).

Examples

			Triangle begins:
        2;
        3,       3;
       13,       9,       4;
       75,      52,      18,      5;
      541,     375,     130,     30,     6;
     4683,    3246,    1125,    260,    45,    7;
    47293,   32781,   11361,   2625,   455,   63,    8;
   545835,  378344,  131124,  30296,  5250,  728,   84,   9;
  7087261, 4912515, 1702548, 393372, 68166, 9450, 1092, 108, 10;
  ...
		

Crossrefs

Row sums are A000629.
Except at n = 1, first column is A000670.
Essentially the same as A154921 --- in A350531 (this triangle), replace the last nonzero entry in row m (this entry is m+1) with the two entries m, 1 to get A154921.
Cf. A173018.

Programs

  • Mathematica
    eulerian[n_, m_] := eulerian[n, m] =
      Sum[((-1)^k)*Binomial[n+1, k]*((m+1-k)^n), {k, 0, m+1}] (* eulerian[n, m] is an Eulerian number, counting the permutations of [n] with m descents *); T[1, 1] = 2; T[n_, 1] := T[n, 1] = Sum[eulerian[n, k]*(2^k), {k, 0, n - 1}]; T[n_, n_] := T[n, n] = n + 1; T[n_, k_] := T[n, k] = Binomial[n, k - 1]*T[n - k + 1, 1]; Table[T[n, k], {n, 1, 12}, {k, 1, n}]

Formula

T(n,n) = n+1 for n >= 1; T(n,1) = Sum_{j=0..n-1} A173018(n,j)*2^j for n >= 2; T(n,k) = binomial(n, k-1)*T(n-k+1,1) for n >= 3, 2 <= k <= n-1.

A350745 Triangle read by rows: T(n,k) is the number of labeled loop-threshold graphs on vertex set [n] with k loops, for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 12, 12, 1, 1, 32, 84, 32, 1, 1, 80, 460, 460, 80, 1, 1, 192, 2190, 4600, 2190, 192, 1, 1, 448, 9534, 37310, 37310, 9534, 448, 1, 1, 1024, 39032, 264208, 483140, 264208, 39032, 1024, 1, 1, 2304, 152856, 1702344, 5229756, 5229756, 1702344, 152856, 2304, 1
Offset: 0

Author

David Galvin, Jan 13 2022

Keywords

Comments

Loop-threshold graphs are constructed from either a single unlooped vertex or a single looped vertex by iteratively adding isolated vertices (adjacent to nothing previously added) and looped dominating vertices (looped, and adjacent to everything previously added).

Examples

			Triangle begins:
  1;
  1,    1;
  1,    4,      1;
  1,   12,     12,       1;
  1,   32,     84,      32,       1;
  1,   80,    460,     460,      80,       1;
  1,  192,   2190,    4600,    2190,     192,       1;
  1,  448,   9534,   37310,   37310,    9534,     448,      1;
  1, 1024,  39032,  264208,  483140,  264208,   39032,   1024,    1;
  1, 2304, 152856, 1702344, 5229756, 5229756, 1702344, 152856, 2304, 1;
  ...
		

Crossrefs

Row sums are A000629.
Columns k=0..1 give: A000012, A001787,
Cf. A210657.

Programs

  • Mathematica
    T[n_, 0] := T[n, 0] = 1; T[n_, k_] := T[n, k] = Binomial[n, k]*Sum[Factorial[l]*StirlingS2[k, l]*(Factorial[l - 1]*StirlingS2[n - k, l - 1] + 2*Factorial[l]*StirlingS2[n - k, l] + Factorial[l + 1]*StirlingS2[n - k, l + 1]), {l, 1, n + 1}]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]
  • PARI
    T(n,k) = if(k==0, 1, binomial(n,k) * sum(j=1, n, j!*stirling(k,j,2) * ((j-1)! * stirling(n-k,j-1,2) + 2*j!*stirling(n-k,j,2) + (j+1)!*stirling(n-k,j+1,2)))) \\ Andrew Howroyd, May 06 2023

Formula

T(n,0) = 1; T(n,k) = binomial(n,k) * Sum_{j=1..n} j!*Stirling2(k,j) * ((j-1)! * Stirling2(n-k,j-1) + 2*j!*Stirling2(n-k,j) + (j+1)!*Stirling2(n-k,j+1)).
T(n,k) = T(n,n-k).
Sum_{k=0..2*n} (-1)^k * T(2*n,k) = A210657(n). - Alois P. Heinz, Feb 01 2022

A350060 Triangle read by rows: T(n,k) is the number of labeled threshold graphs on vertex set [n] in which k dominating vertices are added in standard iterative construction, n >= 1 and 0 <= k <= n-1.

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 22, 22, 1, 1, 65, 200, 65, 1, 1, 171, 1265, 1265, 171, 1, 1, 420, 6566, 15050, 6566, 420, 1, 1, 988, 30156, 136346, 136346, 30156, 988, 1, 1, 2259, 127632, 1039878, 2009952, 1039878, 127632, 2259, 1
Offset: 1

Author

David Galvin, Dec 11 2021

Keywords

Comments

Threshold graphs are constructed from a single vertex by iteratively adding isolated vertices (adjacent to nothing previously added) and dominating vertices (adjacent to everything previously added). The initial vertex is not considered to be a dominating vertex.

Examples

			Triangle begins:
  1;
  1,     1;
  1,     6,      1;
  1,    22,     22,       1;
  1,    65,    200,      65,       1;
  1,   171,   1265,    1265,     171,       1;
  1,   420,   6566,   15050,    6566,     420,      1;
  1,   988,  30156,  136346,  136346,   30156,    988,    1;
  1,  2259, 127632, 1039878, 2009952, 1039878, 127632,  2259,  1;
  ...
		

Crossrefs

Row sums are A005840.
Cf. A348576.

Programs

  • Mathematica
    eulerian[n_,m_] := eulerian[n,m] =
      Sum[((-1)^k)*Binomial[n+1,k]*((m+1-k)^n), {k,0,m+1}] (* eulerian[n, m] is an Eulerian number, counting the permutations of [n] with m descents *);
    op2[n_,k_] := op2[n,k] =
       Sum[(n-j)*eulerian[n-1,j-1]*Binomial[j-1,n-k-1], {j,1,n-1}] (* op2[n,k] counts ordered partitions of [n] with k parts, with first part having size at least 2 *);
    T[n_, 0] := T[n, 0] = 1; T[2, 1] = 1; T[2, k_] := T[2, k] = 0;
    T[n_, k_] :=
    T[n, k] =
      Sum[Binomial[n, k + 1]*
         op2[k + 1,
          l]*(Factorial[l - 1]*StirlingS2[n - k - 1, l - 1] +
           Factorial[l]*StirlingS2[n - k - 1, l]) +
        Binomial[n, k]*Factorial[l]*
         StirlingS2[k, l]*(op2[n - k, l + 1] + op2[n - k, l]), {l, 1,
        n}] (* T[n, k] is number of threshold graphs on n vertices with k dominating vertices added in construction*);
    Table[T[n, k],{n,1,12},{k,0,n-1}]

Formula

T(n,0) = 1 for n >= 1; T(2,1) = 1; T(n,k) = (Sum_{j=1..k} binomial(n, k+1)*A348576(k+1, j)*((j-1)!*A008277(n-k-1, j-1) + j!*A008277(n-k-1, j))) + (Sum_{j=1..n-k-1} binomial(n, k)*j!*A008277(k, j)*(A348576(n-k, j+1) + A348576(n-k, j))) for n >= 3, k >= 1. (See also equation (7) of paper by Galvin, Wesley and Zacovic.)

A350528 Triangle read by rows: T(n,k) is the number of labeled quasi-threshold graphs on vertex set [n] with k components, for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 23, 19, 6, 1, 181, 155, 55, 10, 1, 1812, 1591, 600, 125, 15, 1, 22037, 19705, 7756, 1750, 245, 21, 1, 315569, 286091, 116214, 27741, 4270, 434, 28, 1, 5201602, 4766823, 1983745, 493794, 81291, 9198, 714, 36, 1
Offset: 1

Author

David Galvin, Jan 03 2022

Keywords

Comments

The family of quasi-threshold graphs is the smallest family of graphs that contains K_1 (a single vertex), and is closed under taking unions and adding dominating vertices (adjacent to all other vertices).

Examples

			Triangle begins:
       1;
       1,      1;
       4,      3,      1;
      23,     19,      6,      1;
     181,    155,     55,     10,     1;
    1812,   1591,    600,    125,    15,    1;
   22037,  19705,   7756,   1750,   245,   21,   1;
  315569, 286091; 116214,  27741,  4270,  434,  28,  1;
  ...
		

Crossrefs

First column is A058863.
Row sums are A058864.
Cf. A008277.

Programs

  • Mathematica
    T[n_, k_] := T[n, k] = Sum[((-1)^(n - j))*StirlingS2[n, j]*k*Binomial[j, k]*(j^(j - k - 1)), {j, 1, n}]; Table[T[n, k], {n, 1, 12}, {k, 1, n}]

Formula

T(n,k) = Sum_{j=1..n} (-1)^(n-j)*Stirling2(n, j)*k*binomial(j, k)*j^(j-k-1) for n >= 1, 1 <= k <= n.

A348436 Triangle read by rows. T(n,k) is the number of labeled threshold graphs on n vertices with k components, for 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 23, 16, 6, 1, 166, 115, 40, 10, 1, 1437, 996, 345, 80, 15, 1, 14512, 10059, 3486, 805, 140, 21, 1, 167491, 116096, 40236, 9296, 1610, 224, 28, 1, 2174746, 1507419, 522432, 120708, 20916, 2898, 336, 36, 1, 31374953, 21747460, 7537095, 1741440, 301770, 41832, 4830, 480, 45, 1
Offset: 1

Author

David Galvin, Oct 18 2021

Keywords

Comments

The class of threshold graphs is the smallest class of graphs that includes K1 and is closed under adding isolated vertices and dominating vertices.

Examples

			Triangle begins:
         1;
         1,        1;
         4,        3,       1;
        23,       16,       6,       1;
       166,      115,      40,      10,      1;
      1437,      996,     345,      80,     15,     1;
     14512,    10059,    3486,     805,    140,    21,    1;
    167491,   116096,   40236,    9296,   1610,   224,   28,   1;
   2174746,  1507419,  522432,  120708,  20916,  2898,  336,  36,  1;
  31374953, 21747460, 7537095, 1741440, 301770, 41832, 4830, 480, 45, 1;
...
		

Crossrefs

Cf. A005840 (row sums), A317057 (column k=1), A053525.

Programs

  • Maple
    T := (n, k) -> `if`(n = k, 1, binomial(n, k-1)*A053525(n-k+1)):
    for n from 1 to 10 do seq(T(n, k), k=1..n) od; # Peter Luschny, Oct 24 2021
  • Mathematica
    eulerian[0, 0] := 1; eulerian[n_, m_] := eulerian[n, m] =
    Sum[((-1)^k)*Binomial[n + 1, k]*((m + 1 - k)^n), {k, 0, m + 1}];
    (* t[n] counts the labeled threshold graphs on n vertices *)
    t[0] = 1; t[1] = 1;
    t[n_] := t[n] = Sum[(n - k)*eulerian[n - 1, k - 1]*(2^k), {k, 1, n - 1}];
    T[1, 1] := 1; T[n_, 1] := T[n, 1] = (1/2)*t[n]; T[n_, n_] := T[n, n] = 1;
    T[n_, k_] := T[n, k] = Binomial[n, k - 1]*T[n - k + 1, 1];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten

Formula

T(1,1) = 1; for n >= 2, T(n,1) = A005840(n)/2; for n >= 3 and 2 <= k <= n-1, T(n,k) = binomial(n,k-1)*T(n-k+1,1); and for n >= 2, T(n,n)=1.
T(n, k) = binomial(n, k-1)*A053525(n - k + 1) if k != n, otherwise 1. - Peter Luschny, Oct 24 2021

A348576 Triangle read by rows: T(n,k) is the number of ordered partitions of [n] into k nonempty subsets, in which the first subset has size at least 2, n >= 1 and 1 <= k <= n.

Original entry on oeis.org

0, 1, 0, 1, 3, 0, 1, 10, 12, 0, 1, 25, 80, 60, 0, 1, 56, 360, 660, 360, 0, 1, 119, 1372, 4620, 5880, 2520, 0, 1, 246, 4788, 26376, 58800, 57120, 20160, 0, 1, 501, 15864, 134316, 466704, 771120, 604800, 181440, 0, 1, 1012, 50880, 637020, 3238200, 8094240, 10584000, 6955200, 1814400, 0
Offset: 1

Author

David Galvin, Oct 23 2021

Keywords

Comments

Ordered partitions are also referred to as weak orders.

Examples

			For n=3, the ordered partitions of {1,2,3} in which the first block has size at least 2 are 123, 12/3, 13/2 and 23/1, so T(3,1)=1, T(3,2)=3 and T(3,3)=0.
Triangle begins:
  0;
  1,     0;
  1,     3,     0;
  1,    10,    12,       0;
  1,    25,    80,      60,       0;
  1,    56,   360,     660,     360,       0;
  1,   119,  1372.    4620,    5880,    2520,        0;
  1,   246,  4788,   26376,   58800,   57120,    20160,        0;
  1,   501, 15864,  134316,  466704,  771120,   604800,   181440,       0;
  1,  1012, 50880,  637020, 3238200, 8094240, 10584000,  6955200, 1814400, 0;
  ...
		

Crossrefs

Row sums are A053525.

Programs

  • Maple
    b:= proc(n, t) option remember; expand(`if`(n=0, 1,
          add(x*b(n-j, 1)*binomial(n, j), j=t..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, 2)):
    seq(T(n), n=1..10);  # Alois P. Heinz, Oct 24 2021
  • Mathematica
    eulerian[n_,m_] := eulerian[n,m] =
      Sum[((-1)^k)*Binomial[n+1,k]*((m+1-k)^n), {k,0,m+1}] (* eulerian[n, m] is an Eulerian number, counting the permutations of [n] with m descents *);
    op2[n_,k_] := op2[n,k] =
       Sum[(n-j)*eulerian[n-1,j-1]*Binomial[j-1,n-k-1], {j,1,n-1}] (* op2[n,k] counts ordered partitions on [n] with k parts, with first part having size at least 2 *); Table[op2[n, k],{n,1,12},{k,1,n}]
  • PARI
    TE(n, k) = sum(j=0, k, (-1)^j * (k-j)^n * binomial( n+1, j)); \\ A008292
    T(n,k) = sum(j=1, n-1, (n-j)*TE(n-1,j)*binomial(j-1,n-k-1)); \\ Michel Marcus, Oct 24 2021

Formula

T(n,k) = Sum_{j=1..n-1} (n-j)*A173018(n-1, j-1)*binomial(j-1, n-k-1).

A345882 Number of numbers expressible as b(1)*b(2)*...*b(n) with 1 <= b(i) <= i for each i.

Original entry on oeis.org

1, 2, 5, 11, 30, 64, 178, 382, 758, 1367, 3620, 7193, 19707, 40867, 75706, 130017, 339506, 667390, 1824656, 3724917, 6785689, 11545898, 30099090, 58833294, 105348580, 176098677, 282847446, 438090287, 1095200628, 2057512312, 5494259815, 10925293558, 19311381148
Offset: 1

Author

David Galvin, Sep 16 2021

Keywords

Comments

On replacing * with +, one gets A000124.
In other words, take n! = 1*2*3*...*n and replace any factor by any smaller number. a(n) is the number of different numbers that can be obtained. If b(i) is required to be a divisor of i, we get A027423. - N. J. A. Sloane, Sep 18 2021

Examples

			For n=3, b(1) must equal 1, b(2) can be 1 or 2, and b(3) can be 1, 2 or 3. This gives 3!=6 possible products: 1*1*1=1, 1*2*1=2, 1*1*2=2, 1*1*3=3, 1*2*2=4 and 1*2*3=6. Since 1*2*1=1*1*2, this process yields 5 distinct numbers, so a(3)=5.
		

Crossrefs

Cf. A000124, A027423, A110713, A347685 (first differences), A347686.

Programs

  • Mathematica
    list[1] := {1};
    list[n_] := list[n] = DeleteDuplicates[Flatten[Table[i*list[n - 1], {i, 1, n}]]];
    a[n_] := a[n] = Length[list[n]]; Table[a[n], {n, 1, 10}]
  • PARI
    a(n) = my(l = List()); forvec(x = vector(n, i, [1, i]), listput(l, prod(i = 1, n, x[i])), 1); listsort(l, 1); #l \\ David A. Corneth, Sep 18 2021
    
  • Python
    def A345882set(n):
        if n == 1:
            return {1}
        else:
            s = A345882set(n-1)
            c = set(s)
            for x in s:
                for i in range(2,n+1):
                    c.add(i*x)
            return c
    def A345882(n): return len(A345882set(n)) # Chai Wah Wu, Sep 19 2021

Extensions

a(26)-a(28) from Chai Wah Wu, Sep 19 2021
a(29)-a(33) from Martin Ehrenstein, Sep 22 2021