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.

Previous Showing 21-22 of 22 results.

A122748 Bishops on an n X n board (see Robinson paper for details).

Original entry on oeis.org

1, 1, 2, 2, 4, 8, 16, 40, 72, 260, 432, 1976, 2880, 17632, 23040, 177248, 201600, 2001680, 2016000, 24879520, 21772800, 338969216, 261273600, 5002865792, 3353011200, 79676972608, 46942156800, 1358997441920, 697426329600, 24740358817280, 11158821273600, 478218277674496
Offset: 0

Views

Author

N. J. A. Sloane, Sep 25 2006

Keywords

References

  • R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976). (M_n, p. 208)

Programs

  • Maple
    unprotect(D); D:=proc(n) option remember; if n <= 1 then 1 else D(n-1)+(n-1)*D(n-2); fi; end; # Gives A000085
    M:=proc(n) local k; if n mod 2 = 0 then k:=n/2; if k mod 2 = 0 then RETURN( k!*(k+2)/2 ); else RETURN( (k-1)!*(k+1)^2/2 ); fi; else k:=(n-1)/2; RETURN(D(k)*D(k+1)); fi; end;
  • Mathematica
    d[n_] := d[n] = If[n <= 1, 1, d[n - 1] + (n - 1)*d[n - 2]];
    a[n_] := Module[{k}, If[Mod[n, 2] == 0, k = n/2; If[Mod[k, 2] == 0, Return[k!*(k + 2)/2], Return[(k - 1)!*(k + 1)^2/2]], k = (n - 1)/2; Return[d[k]*d[k + 1]]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 23 2022, after Maple code *)

A263685 Number of inequivalent placements of n nonattacking rooks on n X n board up to rotations of the board.

Original entry on oeis.org

1, 1, 2, 9, 33, 192, 1272, 10182, 90822, 908160, 9980160, 119761980, 1556766780, 21794734080, 326918753280, 5230700053320, 88921859605320, 1600593472880640, 30411275148656640, 608225502973147920, 12772735543856347920, 281000181964839321600, 6463004184741681561600
Offset: 1

Views

Author

Max Alekseyev, Oct 31 2015

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := (r=Mod[n, 4]; m=(n-r)/4; q=Quotient[n, 2]; n! + q!*2^q + 2*If[r <= 1, (2m)!/m!, 0])/4; Array[a, 23] (* Jean-François Alcover, Dec 06 2015, adapted from PARI *)
  • PARI
    { a(n) = ( n! + (n\2)! * 2^(n\2) + 2*if(n%4<=1, (2*(n\4))!/(n\4)! ) )/4; }

Formula

For n=4m or n=4m+1, a(n) = (n! + (2m)!*2^(2*m) + (2m)!/m!)/4.
For n=4m+2 or n=4m+3, a(n) = (n! + (2m+1)!*2^(2*m+1))/4.
a(n) = 2*A000903(n) - A000900(n) - A000902(floor(n/2)).
For n>1, a(n) = 2*A000903(n) - A000085(n)/2.
a(n) = (P(n)+G(n)+2*R(n))/4, where P,G,R are defined in Robinson (1976). See also Maple code in A000903.
Previous Showing 21-22 of 22 results.