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.

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.

This page as a plain text file.
%I A326611 #44 May 14 2021 06:20:56
%S A326611 2,1,1,4,3,5,10,9,15,40,41,65,162,189,321,780,919,1681,4034,5281,9259,
%T A326611 23936,30665,57601,143602,199577,367561,959236,1323243,2585133,
%U A326611 6580650,9609145,18433799,49030248,71211721,142636377,371147842,566921925,1122881889,3024341084,4583822647,9446124313
%N 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.
%e A326611 The four cases for n = 4 are:
%e A326611          o               o               o               o
%e A326611        o   o           o   o           X   o           o   X
%e A326611      o   o   o       o   X   o       o   o   X       X   o   o
%e A326611    o   o   o   o   o   o   o   o   o   X   o   o   o   o   X   o
%o A326611 (Python)
%o A326611 def solve(cli):
%o A326611     count = 1
%o A326611     for k in range(len(cli)):
%o A326611         x,y,z = cli[k]
%o A326611         clo = []
%o A326611         for c in cli[k+1:]:
%o A326611             if (not x in c) and (not y in c) and (not z in c):
%o A326611                 clo.append(c)
%o A326611         count += 2*solve(clo)
%o A326611     return count
%o A326611 def A326611(n):
%o A326611     c0 = []
%o A326611     for x in range(n):
%o A326611         for y in range(x+1,n):
%o A326611             z = n-1-x-y
%o A326611             if z>y: c0.append((x,y,z))
%o A326611     count = solve(c0)
%o A326611     if n%3 == 1:
%o A326611         c1 = [c for c in c0 if not n//3 in c]
%o A326611         count += solve(c1)
%o A326611     return count
%o A326611 # _Bert Dobbelaere_, May 14 2021
%Y A326611 Cf. A283117, A289709.
%K A326611 nonn
%O A326611 1,1
%A A326611 _Andrew Howroyd_, Sep 12 2019
%E A326611 More terms from _Bert Dobbelaere_, May 14 2021