login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333466 Number of self-avoiding closed paths on an n X n grid which pass through four corners ((0,0), (0,n-1), (n-1,n-1), (n-1,0)). 9
1, 1, 11, 373, 44930, 17720400, 22013629316, 84579095455492 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,3

COMMENTS

a(11) = 36061721109572407840288. - Seiichi Manyama, Apr 07 2020

LINKS

Table of n, a(n) for n=2..9.

EXAMPLE

a(2) = 1;

   +--+

   |  |

   +--+

a(3) = 1;

   +--*--+

   |     |

   *     *

   |     |

   +--*--+

a(4) = 11;

   +--*--*--+   +--*--*--+   +--*--*--+

   |        |   |        |   |        |

   *--*--*  *   *--*  *--*   *--*     *

         |  |      |  |         |     |

   *--*--*  *   *--*  *--*   *--*     *

   |        |   |        |   |        |

   +--*--*--+   +--*--*--+   +--*--*--+

   +--*--*--+   +--*--*--+   +--*--*--+

   |        |   |        |   |        |

   *  *--*--*   *  *--*  *   *     *--*

   |  |         |  |  |  |   |     |

   *  *--*--*   *  *  *  *   *     *--*

   |        |   |  |  |  |   |        |

   +--*--*--+   +--*  *--+   +--*--*--+

   +--*--*--+   +--*--*--+   +--*  *--+

   |        |   |        |   |  |  |  |

   *        *   *        *   *  *--*  *

   |        |   |        |   |        |

   *  *--*  *   *        *   *  *--*  *

   |  |  |  |   |        |   |  |  |  |

   +--*  *--+   +--*--*--+   +--*  *--+

   +--*  *--+   +--*  *--+

   |  |  |  |   |  |  |  |

   *  *--*  *   *  *  *  *

   |        |   |  |  |  |

   *        *   *  *--*  *

   |        |   |        |

   +--*--*--+   +--*--*--+

PROG

(Python)

# Using graphillion

from graphillion import GraphSet

import graphillion.tutorial as tl

def A333466(n):

    universe = tl.grid(n - 1, n - 1)

    GraphSet.set_universe(universe)

    cycles = GraphSet.cycles()

    for i in [1, n, n * (n - 1) + 1, n * n]:

        cycles = cycles.including(i)

    return cycles.len()

print([A333466(n) for n in range(2, 10)])

(Ruby)

def search(x, y, n, used)

  return 0 if x < 0 || n <= x || y < 0 || n <= y || used[x + y * n]

  return 1 if x == 0 && y == 1 && [n - 1, n * (n - 1), n * n - 1].all?{|i| used[i] == true}

  cnt = 0

  used[x + y * n] = true

  @move.each{|mo|

    cnt += search(x + mo[0], y + mo[1], n, used)

  }

  used[x + y * n] = false

  cnt

end

def A(n)

  return 1 if n < 3

  @move = [[1, 0], [-1, 0], [0, 1], [0, -1]]

  used = Array.new(n * n, false)

  search(0, 0, n, used)

end

def A333466(n)

  (2..n).map{|i| A(i)}

end

p A333466(6)

CROSSREFS

Main diagonal of A333513.

Cf. A003763, A140517, A333246, A333247, A333323.

Sequence in context: A000464 A291973 A024149 * A018893 A051862 A006698

Adjacent sequences:  A333463 A333464 A333465 * A333467 A333468 A333469

KEYWORD

nonn,more

AUTHOR

Seiichi Manyama, Mar 22 2020

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 26 20:34 EDT 2021. Contains 347672 sequences. (Running on oeis4.)