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 A279409 #24 Aug 08 2025 15:04:35 %S A279409 1,1,1,1,1,1,2,2,2,4,2,2,2,4,5,3,3,3,6,6,9,3,3,3,6,7,9,10,4,4,4,8,8, %T A279409 12,12,16,4,4,4,8,9,12,13,16,18,5,5,5,10,10,15,15,20,20,25,5,5,5,10, %U A279409 11,15,16,20,22,25,27,6,6,6,12,12,18,18,24,24,30,30,36 %N A279409 Triangle read by rows: T(n,m) (n>=m>=1) = maximum number of nonattacking kings on an n X m toroidal board. %C A279409 Independence number of the kings' graph on toroidal n X m chessboard. %C A279409 Right border T(n,n) is A189889. %C A279409 For the usual non-toroidal case, the formula is ceiling(m/2)*ceiling(n/2). %D A279409 John J. Watkins, Across the Board: The Mathematics of Chessboard Problem, Princeton University Press, 2004, pages 194-196. %H A279409 Indranil Ghosh, <a href="/A279409/b279409.txt">Rows 1..125, flattened</a> %H A279409 Dan Freeman, <a href="https://www.slideshare.net/DanFreeman1/chessboard-puzzles-part-4-other-surfaces-and-variations-42702023">Chessboard Puzzles Part 4 - Other Surfaces and Variations</a>. %H A279409 Vaclav Kotesovec, <a href="https://oeis.org/wiki/User:Vaclav_Kotesovec">Non-attacking chess pieces</a>. %F A279409 T(n,m) = floor(min(m*floor(n/2), n*floor(m/2))/2) for m>1; %F A279409 T(n,1) = floor(n/2) for n>1. %e A279409 Triangle starts: %e A279409 1; %e A279409 1, 1; %e A279409 1, 1, 1; %e A279409 2, 2, 2, 4; %e A279409 2, 2, 2, 4, 5; %e A279409 3, 3, 3, 6, 6, 9; %e A279409 3, 3, 3, 6, 7, 9, 10; %e A279409 ... %t A279409 T[1, 1] = 1; T[n_, m_]:= If[m==1, Floor[n/2], Floor[Min[m Floor[n/2], n Floor[m/2]]/2]]; Flatten[Table[T[n,m], {n, 1, 12},{m, 1,n}]] (* _Indranil Ghosh_, Mar 09 2017 *) %o A279409 (PARI) tabl(nn) = {for(n=1, 12, for(m=1, n, print1(if(m==1,if(n==1, 1, floor(n/2)), floor(min(m*floor(n/2), n*floor(m/2))/2)),", ");); print();); }; %o A279409 tabl(12); \\ _Indranil Ghosh_, Mar 09 2017 %o A279409 (Python) %o A279409 def T(n,m): %o A279409 if m==1: %o A279409 if n==1: return 1 %o A279409 return n//2 %o A279409 return min(m*(n//2), n*(m//2))//2 %o A279409 i=1 %o A279409 for n in range(1,126): %o A279409 for m in range(1, n+1): %o A279409 print(i, T(n,m)) %o A279409 i+=1 # _Indranil Ghosh_, Mar 09 2017 %Y A279409 Cf. A085801, A189889, A279408. %K A279409 nonn,tabl,easy %O A279409 1,7 %A A279409 _Andrey Zabolotskiy_, Dec 16 2016