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 A176222 #63 Jan 14 2024 16:36:49 %S A176222 0,3,5,10,14,21,27,36,44,55,65,78,90,105,119,136,152,171,189,210,230, %T A176222 253,275,300,324,351,377,406,434,465,495,528,560,595,629,666,702,741, %U A176222 779,820,860,903,945,990,1034,1081,1127,1176,1224,1275,1325,1378,1430 %N A176222 a(n) = (n^2 - 3*n + 1 + (-1)^n)/2. %C A176222 Let I = I_n be the n X n identity matrix and P = P_n be the incidence matrix of the cycle (1,2,3,...,n). %C A176222 Let T = P^(-1)+I+P. %C A176222 11000...01 %C A176222 11100....0 %C A176222 01110..... %C A176222 00111..... %C A176222 .......... %C A176222 00.....111 %C A176222 10.....011 %C A176222 Then a(n) is the number of (0,1) n X n matrices A <= T (i.e., an element of A can be 1 only if T has a 1 at this place) having exactly two 1's in every row and column with per(A) = 4. %C A176222 a(n) is the maximum number m such that m white kings and m black kings can coexist on an n+1 X n+1 chessboard without attacking each other. - _Aaron Khan_, Jul 05 2022 %D A176222 V. S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, 3 (1992), 15-19. %H A176222 G. C. Greubel, <a href="/A176222/b176222.txt">Table of n, a(n) for n = 3..1000</a> %H A176222 Paul Barry, <a href="http://arxiv.org/abs/1205.2565">On sequences with {-1, 0, 1} Hankel transforms</a>, arXiv preprint arXiv:1205.2565 [math.CO], 2012. %H A176222 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1). %F A176222 a(n) = (n - t(n))*(n - 3 + t(n))/2, where t(n) = 1-(n mod 2). %F A176222 G.f.: x^4*(3-x)/( (1+x)*(1-x)^3 ). - _R. J. Mathar_, Mar 06 2011 %F A176222 From _Bruno Berselli_, Sep 13 2011: (Start) %F A176222 a(n) + a(n+1) = A005563(n-2). %F A176222 a(-n) = A084265(n). (End) %F A176222 a(n) = 1 -2*n +floor(n/2) +floor(n^2/2). - _Wesley Ivan Hurt_, Jun 14 2013 %F A176222 From _Wesley Ivan Hurt_, May 25 2015: (Start) %F A176222 a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4), n>4. %F A176222 a(n) = Sum_{i=(-1)^n..n-2} i. (End) %F A176222 a(n) = A174239(n-2) * A174239(n-1). - _Paul Curtz_, Jul 17 2017 %F A176222 With offset 0, this is ceiling(n/2)*(2*floor(n/2)+3). - _N. J. A. Sloane_, Jan 16 2020 %F A176222 E.g.f.: (1/2)*((1-x)*exp(x/2) - exp(-x/2))^2. - _G. C. Greubel_, Mar 22 2022 %e A176222 For n=5 the reference matrix is: %e A176222 11001 %e A176222 11100 %e A176222 01110 %e A176222 00111 %e A176222 10011 %e A176222 There are 2^(3*n) = 32768 0-1 matrices obtained from removing one or more 1's in it. %e A176222 There are 305 such matrices with permanent 4 and there are 13 such matrices with exactly two 1's in every column and every row. %e A176222 There are 5 matrices having both properties. One of them is: %e A176222 10001 %e A176222 01100 %e A176222 01100 %e A176222 00011 %e A176222 10010 %e A176222 From _Aaron Khan_, Jul 05 2022: (Start) %e A176222 Examples of the sequence when used for kings on a chessboard: %e A176222 . %e A176222 A solution illustrating a(2)=3: %e A176222 +-------+ %e A176222 | B B B | %e A176222 | . . . | %e A176222 | W W W | %e A176222 +-------+ %e A176222 . %e A176222 A solution illustrating a(3)=5: %e A176222 +---------+ %e A176222 | B B B B | %e A176222 | B . . . | %e A176222 | . . . W | %e A176222 | W W W W | %e A176222 +---------+ %e A176222 (End) %p A176222 A176222:=n->(n^2-3*n+1+(-1)^n)/2: seq(A176222(n), n=3..100); # _Wesley Ivan Hurt_, May 25 2015 %t A176222 Table[(n^2 - 3*n + 1 + (-1)^n)/2, {n, 3, 100}] (* or *) CoefficientList[Series[x (x - 3)/((1 + x)*(x - 1)^3), {x, 0, 30}], x] (* _Wesley Ivan Hurt_, May 25 2015 *) %t A176222 LinearRecurrence[{2,0,-2,1},{0,3,5,10},90] (* _Harvey P. Dale_, Jan 14 2024 *) %o A176222 (Magma) [(n^2-3*n+1+(-1)^n)/2: n in [3..100]]; // _Vincenzo Librandi_, Mar 24 2011 %o A176222 (PARI) a(n)=(n^2-3*n+1+(-1)^n)/2 \\ _Charles R Greathouse IV_, Oct 16 2015 %o A176222 (Sage) [n*(n-3)/2 + ((n+1)%2) for n in (3..60)] # _G. C. Greubel_, Mar 22 2022 %Y A176222 Cf. A000211, A052928, A128209, A250000 (queens on a chessboard), A002620 (rooks on a chessboard), A355509 (knights on a chessboard). %K A176222 nonn,easy %O A176222 3,2 %A A176222 _Vladimir Shevelev_, Apr 12 2010 %E A176222 Matrix class definition checked, edited and illustrated by _Olivier Gérard_, Mar 26 2011