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.
%I A352426 #80 Jul 21 2025 13:13:50 %S A352426 0,1,1,2,4,4,4,5,6,7,8,9,10,10,11,12,13,13,14,15,16,17,18,18,19,20,21, %T A352426 21,22,23,24,25,26,26,27,28,29,29,30,31,32,33,33,34,35,36,36,37,38,39, %U A352426 40,40,41,42,43,44,44,45,46,47,48,48,49,50,51,51,52,53 %N A352426 Maximal number of nonattacking white-square queens on an n X n chessboard. %C A352426 Equivalently the maximal number of nonattacking black-square queens on an inverted n X n chessboard, that is a board with the a1 square white, the a2 and b1 squares black, etc. %H A352426 Andy Huchala, <a href="/A352426/b352426.txt">Table of n, a(n) for n = 1..92</a> %H A352426 Andy Huchala, <a href="/A352426/a352426.py.txt">Python program</a>. %H A352426 Math StackExchange, <a href="https://math.stackexchange.com/questions/4397136/black-queens-on-n-times-n-board">Black queens on n X n board</a>, 2022. %F A352426 a(2n) = A352241(2n). %o A352426 (Python) %o A352426 def fill(rows, queens, leftattack, notdownattack, rightattack, color): %o A352426 global c %o A352426 available = ~leftattack & notdownattack & ~rightattack & color %o A352426 if rows==1: %o A352426 if available==0: %o A352426 c[queens] = c.get(queens, 0) + 1 %o A352426 else: %o A352426 c[queens+1] = c.get(queens+1, 0) + bin(available).count('1') %o A352426 return %o A352426 while available: %o A352426 attack = available & -available %o A352426 fill(rows-1, queens+1, (leftattack|attack)<<1, notdownattack&~attack, (rightattack|attack)>>1, ~color) %o A352426 available &= available - 1 %o A352426 fill(rows-1, queens, leftattack<<1, notdownattack, rightattack>>1, ~color) %o A352426 print(' n a(n) count') %o A352426 for n in range(1, 32): %o A352426 c=dict() %o A352426 fill(n, 0, 0, (1<<n)-1, 0, 0x2AAAAAAA) %o A352426 c[0] = 0; m = max(c.keys()) %o A352426 print('%(argument)2d %(value)4d %(count)8d' % {"argument" : n, "value" : m, "count" : c[m]}) %Y A352426 Cf. A352241, A274616. %K A352426 nonn %O A352426 1,4 %A A352426 _Martin Ehrenstein_, Mar 16 2022 %E A352426 a(17)-a(24) from _Vaclav Kotesovec_, Mar 17 2022 %E A352426 a(25)-a(26) from _Vaclav Kotesovec_, Mar 20 2022 %E A352426 a(27) onwards from _Andy Huchala_, Mar 27 2024