A007764
Number of nonintersecting (or self-avoiding) rook paths joining opposite corners of an n X n grid.
Original entry on oeis.org
1, 2, 12, 184, 8512, 1262816, 575780564, 789360053252, 3266598486981642, 41044208702632496804, 1568758030464750013214100, 182413291514248049241470885236, 64528039343270018963357185158482118, 69450664761521361664274701548907358996488
Offset: 1
Suppose we start at (1,1) and end at (n,n). Let U, D, L, R denote steps that are up, down, left, right.
a(2) = 2: UR or RU.
a(3) = 12: UURR, UURDRU, UURDDRUU, URUR, URRU, URDRUU and their reflections in the x=y line.
- Steven R. Finch, Mathematical Constants, Cambridge, 2003, section 5.10, pp. 331-338.
- Guttmann A J and Jensen I 2022 Self-avoiding walks and polygons crossing a domain on the square and hexagonal lattices Journal of Physics A: Mathematical and Theoretical 55 012345, (33pp) ; arXiv:2208.06744, Aug 2022.
- D. E. Knuth, 'Things A Computer Scientist Rarely Talks About,' CSLI Publications, Stanford, CA, 2001, pages 27-28.
- D. E. Knuth, The Art of Computer Programming, Section 7.1.4.
- Shin-ichi Minato, The power of enumeration - BDD/ZDD-based algorithms for tackling combinatorial explosion, Chapter 3 of Applications of Zero-Suppressed Decision Diagrams, ed. T. Satsoa and J. T. Butler, Morgan & Claypool Publishers, 2014
- Shin-ichi Minato, Counting by ZDD, Encyclopedia of Algorithms, 2014, pp. 1-6.
- Netnews group rec.puzzles, Frequently Asked Questions (FAQ) file. (Science Section).
- I. Jensen, H. Iwashita, and R. Spaans, Table of n, a(n) for n = 1..27 (I. Jensen computed terms 1 to 20, H. Iwashita computed 21 and 22, R. Spaans computed 23 to 25, and H. Iwashita computed 26 and 27)
- M. Bousquet-Mélou, A. J. Guttmann and I. Jensen, Self-avoiding walks crossing a square, arXiv:cond-mat/0506341 [cond-mat.stat-mech], 2005.
- Doi, Maeda, Nagatomo, Niiyama, Sanson, Suzuki, et al., Time with class! Let's count! [Youtube-animation demonstrating this sequence. In Japanese with English translation]
- Steven R. Finch, Self-Avoiding-Walk Connective Constants
- Anthony J. Guttmann and Iwan Jensen, The gerrymander sequence, or A348456, arXiv:2211.14482 [math.CO], 2022.
- H. Iwashita, J. Kawahara, and S. Minato, ZDD-Based Computation of the Number of Paths in a Graph, TCS Technical Report, TCS-TR-A-12-60, Hokkaido University, September 18, 2012.
- H. Iwashita, Y. Nakazawa, J. Kawahara, T. Uno, and S. Minato, Efficient Computation of the Number of Paths in a Grid Graph with Minimal Perfect Hash Functions, TCS Technical Report, TCS-TR-A-13-64, Hokkaido University, April 26, 2013.
- I. Jensen, Series Expansions for Self-Avoiding Walks
- Shin-ichi Minato, Power of Enumeration - Recent Topics on BDD/ZDD-Based Techniques for Discrete Structure Manipulation, IEICE Transactions on Information and Systems, Volume E100.D (2017), Issue 8, p. 1556-1562.
- Shin-ichi Minato, Motivating Problems and Algorithmic Solutions, Algorithmic Foundations for Social Advancement, Springer, Singapore (2025), 17-29.
- OEIS Wiki, Self-avoiding_walks
- Kohei Shinohara, Atsuto Seko, Takashi Horiyama, Masakazu Ishihata, Junya Honda, and Isao Tanaka, Derivative structure enumeration using binary decision diagram, arXiv:2002.12603 [physics.comp-ph], 2020.
- Ruben Grønning Spaans, C program
- Jens Weise, Evolutionary Many-Objective Optimisation for Pathfinding Problems, Ph. D. Dissertation, Otto von Guercke Univ., Magdeburg (Germany, 2022), see p. 53.
- Eric Weisstein's World of Mathematics, Self-Avoiding Walk
-
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A007764(n):
if n == 1: return 1
universe = tl.grid(n - 1, n - 1)
GraphSet.set_universe(universe)
start, goal = 1, n * n
paths = GraphSet.paths(start, goal)
return paths.len()
print([A007764(n) for n in range(1, 10)]) # Seiichi Manyama, Mar 21 2020
Computed to n=12 by John Van Rosendale in 1981
Extended to n=22 using ZDD technique based on Knuth's The Art of Computer Programming (exercise 225 in 7.1.4) by H. Iwashita, J. Kawahara, and S. Minato, Sep 18 2012
Extended to n=25 using state space compression (with rank/unrank) and dynamic programming (based in I. Jensen) by
Ruben Grønning Spaans, Feb 22 2013
A333323
Number of self-avoiding closed paths on an n X n grid which pass through NW and SE corners.
Original entry on oeis.org
1, 3, 42, 1799, 232094, 92617031, 115156685746, 442641690778179, 5224287477491915786, 188825256606226776728029, 20879416139356164466643759334, 7057757437924198729598570424130207, 7287699030020917172151307665469211016474, 22973720258279267139936821063450448822110219653
Offset: 2
a(2) = 1;
+--*
| |
*--+
a(3) = 3;
+--*--* +--*--* +--*
| | | | | |
*--* * * * * *--*
| | | | | |
*--+ *--*--+ *--*--+
- Anthony J. Guttmann and Iwan Jensen, Table of n, a(n) for n = 2..27
- Anthony J. Guttmann and Iwan Jensen, Self-avoiding walks and polygons crossing a domain on the square and hexagonal lattices, arXiv:2208.06744 [math-ph], Aug 13 2022, Table D2 (with offset 1).
- Anthony J. Guttmann and Iwan Jensen, The gerrymander sequence, or A348456, arXiv:2211.14482 [math.CO], 2022.
-
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A333323(n):
universe = tl.grid(n - 1, n - 1)
GraphSet.set_universe(universe)
cycles = GraphSet.cycles().including(1).including(n * n)
return cycles.len()
print([A333323(n) for n in range(2, 10)])
A348452
Irregular triangle read by rows: T(n,k) (n >= 1, 1 <= k <= n^2) is the number of ways to tile an n X n chessboard with k rook-connected polyominoes of equal area.
Original entry on oeis.org
1, 1, 2, 0, 1, 1, 0, 10, 0, 0, 0, 0, 0, 1, 1, 70, 0, 117, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 4006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 80518, 264500, 442791, 0, 451206, 0, 0, 178939, 0, 0, 80092, 0, 0, 0, 0, 0, 6728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 158753814, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1
The first seven rows of the triangle are:
1,
1, 2, 0, 1,
1, 0, 10, 0, 0, 0, 0, 0, 1,
1, 70, 0, 117, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 4006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 80518, 264500, 442791, 0, 451206, 0, 0, 178939, 0, 0, 80092, 0, 0, 0, 0, 0, 6728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 158753814, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
...
The domino is the only polyomino of area 2, and the 36 ways to tile a 4 X 4 square with dominoes are shown in one of the links.
- Moon Duchin, Graphs, Geometry and Gerrymandering”, Talk at Celebration of Mind Conference, Oct 23 2021.
- P. W. Kasteleyn, The Statistics of Dimers on a Lattice, Physica, 27 (1961), 1209-1225.
- P. W. Kasteleyn, Dimer statistics and phase transitions, J. Mathematical Phys. 4 1963 287-293. MR0153427 (27 #3394).
- Zach Schutzman and MGGG, The Known Sizes of Grid Metagraphs, Metric Geometry and Gerrymandering Group (MGGG), Boston, Oct 01 2018.
- N. J. A. Sloane, Illustration for T(3,3) = 10
- N. J. A. Sloane, Illustration for T(4,2) = 70 [Labels give code, B = length of internal boundary, C = number of internal corners, G = group order, # = number of this type. Note that (B,C) determines the type]
- N. J. A. Sloane, Illustration for T(4,8) = 36 [Slide from an old talk of mine]
- N. J. A. Sloane, The On-Line Encyclopedia of Integer Sequences: An illustrated guide with many unsolved problems, Guest Lecture given in Doron Zeilberger's Experimental Mathematics Math640 Class, Rutgers University, Spring Semester, Apr 28 2022: Slides; Slides (an alternative source).
More than the usual number of terms are given, in order to show the first seven rows.
A348453
Irregular triangle read by rows: T(n,k) (n >= 1, 1 <= k <= number of divisors of n^2) is the number of ways to tile an n X n chessboard with d_k rook-connected polyominoes of equal area, where d_k is the k-th divisor of n^2.
Original entry on oeis.org
1, 1, 2, 1, 1, 10, 1, 1, 70, 117, 36, 1, 1, 4006, 1, 1, 80518, 264500, 442791, 451206, 178939, 80092, 6728, 1, 1, 158753814, 1, 7157114189
Offset: 1
The first eight rows of the triangle are:
1,
1, 2, 1,
1, 10, 1,
1, 70, 117, 36, 1,
1, 4006, 1,
1, 80518, 264500, 442791, 451206, 178939, 80092, 6728, 1,
1, 158753814, 1,
1, 7157114189, ?, 187497290034, ?, ?, 1,
...
The corresponding divisors d_k are:
1,
1, 2, 4,
1, 3, 9,
1, 2, 4, 8, 16,
1, 5, 25,
...
The domino is the only polyomino of area 2, and the 36 ways to tile a 4 X 4 square with dominoes are shown in one of the links.
- Moon Duchin, Graphs, Geometry and Gerrymandering”, Talk at Celebration of Mind Conference, Oct 23 2021.
- P. W. Kasteleyn, The Statistics of Dimers on a Lattice, Physica, 27 (1961), 1209-1225.
- P. W. Kasteleyn, Dimer statistics and phase transitions, J. Mathematical Phys. 4 1963 287-293. MR0153427 (27 #3394).
- Zach Schutzman and MGGG, The Known Sizes of Grid Metagraphs, Metric Geometry and Gerrymandering Group (MGGG), Boston, Oct 01 2018.
- N. J. A. Sloane, Illustration for T(3,2) = 10
- N. J. A. Sloane, Illustration for T(4,2) = 70 [Labels give code, B = length of internal boundary, C = number of internal corners, G = group order, # = number of this type. Note that (B,C) determines the type]
- N. J. A. Sloane, Illustration for T(4,4) = 36 [Slide from an old talk of mine]
- N. J. A. Sloane, "A Handbook of Integer Sequences" Fifty Years Later, arXiv:2301.03149 [math.NT], 2023, p. 21.
A348454
Irregular triangle read by rows: T(n,k) (n >= 1, 1 <= k <= n^2) is the number of ways to tile an n X n chessboard with rook-connected polyominoes of area k.
Original entry on oeis.org
1, 1, 2, 0, 1, 1, 0, 10, 0, 0, 0, 0, 0, 1, 1, 36, 0, 117, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 4006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 6728, 80092, 178939, 0, 451206, 0, 0, 442791, 0, 0, 264500, 0, 0, 0, 0, 0, 80518, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 158753814, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1
Triangle begins:
1,
1, 2, 0, 1,
1, 0, 10, 0, 0, 0, 0, 0, 1,
1, 36, 0, 117, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 4006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 6728, 80092, 178939, 0, 451206, 0, 0, 442791, 0, 0, 264500, 0, 0, 0, 0, 0, 80518, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 158753814, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
...
More than the usual number of terms are given, in order to show the first seven rows.
A348455
Irregular triangle read by rows: T(n,k) (n >= 1, 1 <= k <= number of divisors of n^2) is the number of ways to tile an n X n chessboard with rook-connected polyominoes of area d_k, where d_k is the k-th divisor of n^2.
Original entry on oeis.org
1, 1, 2, 1, 1, 10, 1, 1, 70, 117, 36, 1, 1, 4006, 1, 1, 6728, 80092, 178939, 451206, 442791, 264500, 80518, 1, 1, 158753814, 1
Offset: 1
Triangle begins:
1,
1, 2, 1,
1, 10, 1,
1, 70, 117, 36, 1,
1, 4006, 1,
1, 6728, 80092, 178939, 451206, 442791, 264500, 80518, 1,
1, 158753814, 1,
1, ?, ?, 187497290034, ?, 7157114189, 1,
...
A167242
Number of ways to partition a 2*n X 3 grid into 2 connected equal-area regions.
Original entry on oeis.org
1, 3, 19, 85, 355, 1435, 5717, 22645, 89521, 353735, 1397863, 5525341, 21846421, 86403027, 341822335, 1352660761, 5354124895, 21197945407, 83945924393, 332507403625, 1317329758675, 5220055148883, 20688989887169, 82013159349085, 325165555406795, 1289434099001055, 5114044079094817, 20286061330030705, 80481556028898031
Offset: 0
Some solutions for n=4
...1.1.1...1.1.1...1.1.2...1.1.2...1.1.2...1.1.1...1.1.1...1.1.1...1.1.1
...1.1.1...1.1.2...1.2.2...1.1.2...1.2.2...2.2.1...1.1.1...2.1.1...1.1.1
...2.2.1...1.2.2...1.1.2...1.2.2...1.2.2...2.2.1...2.1.1...2.2.1...2.1.1
...2.1.1...1.2.2...1.2.2...1.2.2...1.1.2...2.2.1...2.2.1...2.1.1...2.2.1
...2.2.1...1.2.2...1.1.2...1.2.2...1.1.2...2.1.1...2.2.1...2.2.1...2.2.1
...2.2.1...1.1.2...1.1.2...1.2.2...1.1.2...2.1.1...2.1.1...2.1.1...2.2.1
...2.2.1...1.2.2...1.2.2...1.1.2...1.1.2...2.1.1...2.2.2...2.1.2...2.2.1
...2.2.2...1.2.2...1.2.2...1.1.2...2.2.2...2.2.2...2.2.2...2.2.2...2.2.2
- D. E. Knuth (Proposer) and Editors (Solver), Balanced tilings of a rectangle with three rows, Problem 11929, Amer. Math. Monthly, 125 (2018), 566-568.
- Manuel Kauers, Christoph Koutschan, and George Spahn, A348456(4) = 7157114189, arXiv:2209.01787 [math.CO], 2022.
- Manuel Kauers, Christoph Koutschan, and George Spahn, How Does the Gerrymander Sequence Continue?, J. Int. Seq., Vol. 25 (2022), Article 22.9.7.
A358289
Generalized Gerrymander sequence: number of ordered ways to divide an n X n square into two connected regions, both of area n^2/2 if n is even, or of areas (n^2-1)/2 and (n^2+1)/2 if n is odd.
Original entry on oeis.org
0, 4, 16, 140, 2804, 161036, 27803749, 14314228378, 21838347160809, 99704315229167288, 1367135978051264146578, 56578717186086829451888706, 7065692298178203128922479762418, 2670113158846160742372913777087464324, 3052313665715695874527667027409186333152556
Offset: 1
For n = 2, the square can be split vertically or horizontally, and then there are two ways to order the regions, so a(2) = 2*2 = 4.
For n = 3 we must choose a connected region of area 4 with a connected complement of area 5.
The possibilities are
XXO XXX XXX
XXO XOO OXO
OOO OOO OOO
4 ways 8 ways 4 ways
so a(3) = 16.
Comments