[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A326611
Number of arrangements of rooks with rotational symmetry on a triangular grid with n grid points on each side and no two rooks on the same row, column or diagonal.
4
2, 1, 1, 4, 3, 5, 10, 9, 15, 40, 41, 65, 162, 189, 321, 780, 919, 1681, 4034, 5281, 9259, 23936, 30665, 57601, 143602, 199577, 367561, 959236, 1323243, 2585133, 6580650, 9609145, 18433799, 49030248, 71211721, 142636377, 371147842, 566921925, 1122881889, 3024341084, 4583822647, 9446124313
OFFSET
1,1
EXAMPLE
The four cases for n = 4 are:
o o o o
o o o o X o o X
o o o o X o o o X X o o
o o o o o o o o o X o o o o X o
PROG
(Python)
def solve(cli):
count = 1
for k in range(len(cli)):
x, y, z = cli[k]
clo = []
for c in cli[k+1:]:
if (not x in c) and (not y in c) and (not z in c):
clo.append(c)
count += 2*solve(clo)
return count
def A326611(n):
c0 = []
for x in range(n):
for y in range(x+1, n):
z = n-1-x-y
if z>y: c0.append((x, y, z))
count = solve(c0)
if n%3 == 1:
c1 = [c for c in c0 if not n//3 in c]
count += solve(c1)
return count
# Bert Dobbelaere, May 14 2021
CROSSREFS
Sequence in context: A357320 A174455 A245596 * A083293 A350912 A055370
KEYWORD
nonn
AUTHOR
Andrew Howroyd, Sep 12 2019
EXTENSIONS
More terms from Bert Dobbelaere, May 14 2021
STATUS
approved