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.

A363370 Number of ways to distribute n guards on the corners and walls of a square castle so that each wall has an equal number of guards modulo rotations and reflections.

Original entry on oeis.org

1, 0, 1, 1, 3, 2, 5, 4, 9, 8, 13, 13, 22, 20, 30, 31, 44, 44, 60, 61, 82, 84, 106, 111, 141, 144, 177, 186, 225, 234, 279, 291, 345, 360, 417, 438, 508, 528, 604, 634, 720, 752, 848, 886, 996, 1040, 1156, 1210, 1345, 1400, 1545, 1615, 1775, 1850, 2025, 2110
Offset: 0

Views

Author

Martins Opmanis, May 29 2023

Keywords

Comments

The four walls of the castle are defended by n guards, each of whom is assigned to one of eight locations in the castle: one of the four towers at the corners of the castle, or the middle of one of the four walls. Each guard in a tower will defend the two adjoining walls, while each guard positioned at the middle of a wall will guard only that wall. The guards must be distributed so that each wall is defended by the same number of guards. If two distributions can be obtained from one another by reflection and/or rotation, they are counted as one.

Examples

			For n = 5 there are two distinct distributions:
  2-0-0    1-1-0
  |   |    |   |
  0   1    0   1
  |   |    |   |
  0-1-1    1-0-1
		

Programs

  • PARI
    Vec((1/((1 - x^6)*(1 - x^4)) + 1/((1 - x^3)*(1 - x^2))^2)/(2*(1 - x^4)) + O(x^61)) \\ Andrew Howroyd, May 29 2023

Formula

G.f.: (1/((1 - x^6)*(1 - x^4)) + 1/((1 - x^3)*(1 - x^2))^2)/(2*(1 - x^4)). - Andrew Howroyd, May 29 2023

Extensions

Terms a(22) and beyond from Andrew Howroyd, May 29 2023