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.

A122749 Number of arrangements of n non-attacking bishops on an n X n board such that every square of the board is controlled by at least one bishop.

Original entry on oeis.org

4, 2, 16, 44, 256, 768, 5184, 25344, 186624, 996480, 8294400, 57888000, 530841600, 4006195200, 40642560000, 367408742400, 4064256000000, 39358255104000, 474054819840000, 5254107586560000, 68263894056960000, 804207665479680000, 11242684107325440000
Offset: 2

Views

Author

N. J. A. Sloane, Sep 25 2006

Keywords

Crossrefs

Programs

  • Maple
    E:=proc(n) local k; if n mod 2 = 0 then k := n/2; if k mod 2 = 0 then RETURN( (k!*(k+2)/2)^2 ); else RETURN( ((k-1)!*(k+1)^2/2)^2 ); fi; else k := (n-1)/2; if k mod 2 = 0 then RETURN( ((k!)^2/12)*(3*k^3+16*k^2+18*k+8) ); else RETURN( ((k-1)!*(k+1)!/12)*(3*k^3+13*k^2-k-3) ); fi; fi; end;
  • Mathematica
    Table[If[n==1,1,1/768*(2*(3*n^3+23*n^2+17*n+21)*(((n-1)/2)!)^2*(1-(-1)^n+2*Sin[(Pi*n)/2])-2*(3*n^3+17*n^2-47*n+3)*((n-3)/2)!*((n+1)/2)!*((-1)^n+2*Sin[(Pi*n)/2]-1)+3*(n+2)^4*((n/2-1)!)^2*((-1)^n-2*Cos[(Pi*n)/2]+1)+12*(n+4)^2*((n/2)!)^2*((-1)^n+2*Cos[(Pi*n)/2]+1))],{n,2,25}] (* Vaclav Kotesovec, Apr 26 2012 *)
    a[n_] := Module[{k}, If[Mod[n, 2]==0, k = n/2; If[Mod[k, 2]==0, (k!*(k+2) /2)^2, ((k-1)!*(k+1)^2/2)^2], k = (n-1)/2; If[Mod[k, 2]==0, ((k!)^2/12)* (3*k^3+16*k^2+18*k+8), ((k-1)!*(k+1)!/12)*(3*k^3+13*k^2-k-3)]]];
    Table[a[n], {n, 2, 25}] (* Jean-François Alcover, Jul 23 2022, after Maple code *)

Formula

From Andy Huchala, Mar 22 2024 (based on Mathematica code): (Start)
a(4*n) = (n+1)^2*((2*n)!)^2.
a(4*n+1) = (1/3)*(n+2)*(1+4*n+6*n^2)*((2*n)!)^2.
a(4*n+2) = 4*(n+1)^4*((2*n)!)^2.
a(4*n+3) = (1/3)*(3+17*n+22*n^2+6*n^3)*(2*n)!*(2*n+2)!. (End)

Extensions

New name from Vaclav Kotesovec, Apr 26 2012