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.

Showing 1-10 of 16 results. Next

A061995 Number of ways to place 2 nonattacking kings on an n X n board.

Original entry on oeis.org

0, 0, 0, 16, 78, 228, 520, 1020, 1806, 2968, 4608, 6840, 9790, 13596, 18408, 24388, 31710, 40560, 51136, 63648, 78318, 95380, 115080, 137676, 163438, 192648, 225600, 262600, 303966, 350028, 401128, 457620, 519870, 588256
Offset: 0

Views

Author

Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 31 2001

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [(n-1)*(n-2)*(n^2+3*n-2)/2: n in [1..30]]; // G. C. Greubel, Nov 04 2018
  • Mathematica
    CoefficientList[Series[2 x^3 (-8 + x + x^2) / (x-1)^5, {x, 0, 40}], x] (* Vincenzo Librandi, May 02 2013 *)
  • PARI
    x='x+O('x^30); Vec(2*x^3*(x^2+x-8)/(x-1)^5) \\ G. C. Greubel, Nov 04 2018
    

Formula

G.f.: 2*x^3*(x^2 + x - 8)/(x - 1)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n >= 6.
a(n) = (n - 1)*(n - 2)*(n^2 + 3*n - 2)/2, n >= 1.
E.g.f.: (4 - (4 - 4*x + 2*x^2 - 6*x^3 - x^4)*exp(x))/2. - G. C. Greubel, Nov 04 2018

A061996 Number of ways to place 3 nonattacking kings on an n X n board.

Original entry on oeis.org

0, 0, 0, 8, 140, 964, 3920, 11860, 29708, 65240, 129984, 240240, 418220, 693308, 1103440, 1696604, 2532460, 3684080, 5239808, 7305240, 10005324, 13486580, 17919440, 23500708, 30456140, 39043144, 49553600, 62316800
Offset: 0

Views

Author

Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 31 2001

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[4x^3(2 +21x +38x^2 -42x^3 +11x^4)/(1-x)^7, {x, 0, 40}], x] (* Vincenzo Librandi, May 02 2013 *)
  • SageMath
    [(n-1)*(n-2)*(n^4+3*n^3-20*n^2-30*n+132)/6 -44*bool(n==0) for n in (0..40)] # G. C. Greubel, Apr 29 2022

Formula

G.f.: 4*x^3*(2 + 21*x + 38*x^2 - 42*x^3 + 11*x^4)/(1 - x)^7.
Recurrence: a(n) = 7*a(n-1) - 21*a(n-2) + 35*a(n-3) - 35*a(n-4) + 21*a(n-5) - 7*a(n-6) + a(n-7), n >= 8.
a(n) = (n-1)*(n-2)*(n^4 + 3*n^3 - 20*n^2 - 30*n + 132)/6, n >= 1.
a(n) = A193580(n,3). - R. J. Mathar, Sep 03 2016
E.g.f.: -44 + (1/6)*(264 -264*x +132*x^2 -36*x^3 +38*x^4 +15*x^5 +x^6)*exp(x). - G. C. Greubel, Apr 29 2022

A061997 Number of ways to place 4 nonattacking kings on an n X n board.

Original entry on oeis.org

0, 0, 0, 1, 79, 1987, 16834, 85275, 317471, 962089, 2515262, 5882109, 12605095, 25175191, 47443474, 85152487, 146608359, 243516365, 392004286, 613859609, 938008287, 1402264459, 2055382210, 2959442131, 4192607119
Offset: 0

Views

Author

Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 31 2001

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 50);
    [0,0,0] cat Coefficients(R!( x^3*(1 +70*x +1312*x^2 +1711*x^3 -1209*x^4 -1060*x^5 +1186*x^6 -361*x^7 +30*x^8)/(1-x)^9 )); // G. C. Greubel, Apr 30 2022
    
  • Mathematica
    CoefficientList[Series[x^3*(1 +70*x +1312*x^2 +1711*x^3 -1209*x^4 -1060*x^5 +1186*x^6 -361*x^7 +30*x^8)/(1-x)^9, {x, 0, 50}], x] (* Vincenzo Librandi, May 02 2013 *)
  • SageMath
    [0,0,0]+[(n^8 -54*n^6 +72*n^5 +995*n^4 -2472*n^3 -5094*n^2 +21480*n -17112)/24 for n in (3..50)] # G. C. Greubel, Apr 30 2022

Formula

G.f.: x^3*(1 + 70*x + 1312*x^2 + 1711*x^3 - 1209*x^4 - 1060*x^5 + 1186*x^6 - 361*x^7 + 30*x^8)/(1 - x)^9.
Recurrence: a(n) = 9*a(n-1) - 36*a(n-2) + 84*a(n-3) - 126*a(n-4) + 126*a(n-5) - 84*a(n-6) + 36*a(n-7) - 9*a(n-8) + a(n-9), n >= 12.
Explicit formula (K.Fabel and K.Soltsien): a(n) = (n^8 - 54*n^6 + 72*n^5 + 995*n^4 - 2472*n^3 - 5094*n^2 + 21480*n - 17112)/24, n >= 3.
a(n) = A193580(n,4). - R. J. Mathar, Sep 03 2016

A172158 Number of ways to place 6 nonattacking kings on an n X n board.

Original entry on oeis.org

0, 0, 0, 0, 978, 62266, 1220298, 12033330, 77784658, 377818258, 1492665418, 5042436754, 15062292834, 40736208186, 101489568538, 235984235970, 517314078210, 1077720399538, 2147500025914, 4114538426818, 7613150953522, 13653752767866, 23808409699242
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 27 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[2*x^4*(489 +24776*x +243562*x^2 +373248*x^3 -287097*x^4 -263140*x^5 +376992*x^6 -162056*x^7 +36103*x^8 -20892*x^9 +14622*x^10 -4432*x^11 +465*x^12)/(1-x)^13, {x, 0, 40}], x] (* Vincenzo Librandi, May 27 2013 *)
  • SageMath
    [0,0,0,0]+[(n^12 -135*n^10 +180*n^9 +7465*n^8 -18840*n^7 -202665*n^6 + 751860*n^5 +2442334*n^4 -13441200*n^3 -3643800*n^2 +89860320*n -108217440)/720 for n in (5..40)] # G. C. Greubel, Apr 21 2022

Formula

a(n) = (n^12 - 135*n^10 + 180*n^9 + 7465*n^8 - 18840*n^7 - 202665*n^6 + 751860*n^5 + 2442334*n^4 - 13441200*n^3 - 3643800*n^2 + 89860320*n - 108217440)/720, n>=5. For any fixed value of k > 1, a(n) = n^(2*k)/k! - 9*n^(2*k-2)/2/(k-2)! + 6*n^(2*k-3)/(k-2)! ... - Vaclav Kotesovec, Jan 27 2010
G.f.: 2*x^5 * (489 + 24776*x + 243562*x^2 + 373248*x^3 - 287097*x^4 - 263140*x^5 + 376992*x^6 - 162056*x^7 + 36103*x^8 - 20892*x^9 + 14622*x^10 - 4432*x^11 + 465*x^12)/(1-x)^13. - Vaclav Kotesovec, Mar 24 2010

Extensions

More terms from Vincenzo Librandi, May 27 2013

A193580 Triangle read by rows: T(n,k) = number of ways to place k nonattacking kings on an n X n board.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 9, 16, 8, 1, 1, 16, 78, 140, 79, 1, 25, 228, 964, 1987, 1974, 978, 242, 27, 1, 1, 36, 520, 3920, 16834, 42368, 62266, 51504, 21792, 3600, 1, 49, 1020, 11860, 85275, 397014, 1220298, 2484382, 3324193, 2882737, 1601292, 569818, 129657, 18389, 1520, 64, 1
Offset: 0

Views

Author

Andrew Woods, Aug 27 2011

Keywords

Comments

Rows 2n and 2n-1 both contain 1 + n^2 entries. Cf. A008794.
Row n sums to A063443(n+1).
Number of walks of length n-1 on a graph in which each node represents a 11-avoiding n-bit binary sequence B and adjacency of B and B' is determined by B'&(B|(B<<1)|(B>>1))=0 and the total number of nonzero bits in the walk is k.
Row n gives the coefficients of the independence polynomial of the n X n king graph. - Eric W. Weisstein, Jun 20 2017

Examples

			The table begins with T(0,0):
  1;
  1,   1;
  1,   4;
  1,   9,  16,   8,   1;
  1,  16,  78, 140,  79;
  ...
T(4,3) = 140 because there are 140 ways to place 3 kings on a 4 X 4 chessboard so that no king threatens any other.
		

References

  • Norman Biggs, Algebraic Graph Theory, Cambridge University Press, New York, NY, second edition, 1993.

Crossrefs

Diagonal: A201513.
Cf. A179403, etc., for extension to toroidal boards.
Cf. A166540, etc., for extension into three dimensions.
Cf. A098487 for a clipped version.
Row n sums to A063443(n+1).

Formula

T(n, 0) = 1;
T(n, 1) = n^2;
T(2n-1, n^2-1) = n^3;
T(2n-1, n^2) = 1.

A201513 Number of ways to place n nonattacking kings on an n X n board.

Original entry on oeis.org

1, 1, 0, 8, 79, 1974, 62266, 2484382, 119138166, 6655170642, 423677826986, 30242576462856, 2390359529372724, 207127434998494421, 19516867860507198208, 1986288643031862123264, 217094567491104327256049, 25357029929230564723578520, 3151672341378566296926684684
Offset: 0

Views

Author

Vaclav Kotesovec, Dec 02 2011

Keywords

Crossrefs

Formula

Asymptotics (Vaclav Kotesovec, Nov 29 2011): n^(2n)/n!*exp(-9/2).

Extensions

a(0)=1 prepended by Alois P. Heinz, May 11 2017

A172228 Number of ways to place 5 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 1, 304, 10741, 127960, 870589, 4197456, 16005187, 51439096, 145085447, 369074128, 863338777, 1883786680, 3875953561, 7583888944, 14206566327, 25617069208, 44663199283, 75572017136, 124485188701, 200156902936, 314851577749, 485484612496, 735056106571, 1094434774968
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

Wazir is a (fairy chess) leaper [0,1].

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^2 (6 x^11 - 26 x^10 - 93 x^9 + 527 x^8 + 490 x^7 - 6710 x^6 + 13630 x^5 - 3954 x^4 - 26364 x^3 - 7452 x^2 - 293 x - 1) / (x - 1)^11, {x, 0, 50}], x] (* Vincenzo Librandi, May 28 2013 *)

Formula

a(n) = (n^10-50n^8+40n^7+995n^6-1560n^5-8890n^4+21080n^3+24264n^2-97440n+59520)/120, n>=4.
For any fixed value of k > 1, a(n) = n^(2k)/k! - 5/2/(k-2)!*n^(2k-2) + ...
G.f.: x^3 * (6*x^11 -26*x^10 -93*x^9 +527*x^8 +490*x^7 -6710*x^6 +13630*x^5 -3954*x^4 -26364*x^3 -7452*x^2 -293*x -1) / (x-1)^11. - Vaclav Kotesovec, Apr 29 2011
a(n) = A232833(n,5). - R. J. Mathar, Apr 11 2024

Extensions

Corrected a(4) and g.f., Vaclav Kotesovec, Apr 29 2011.
More terms from Vincenzo Librandi, May 28 2013

A279114 Number of non-equivalent ways to place 5 non-attacking kings on an n X n board.

Original entry on oeis.org

0, 0, 0, 0, 273, 5335, 50021, 291171, 1263125, 4434783, 13355477, 35672426, 86686721, 194886975, 410820269, 819819261, 1561128613, 2853802623, 5033838173, 8602315716, 14291999441, 23150803815, 36654054741, 56841404455, 86496828245, 129363299967, 190419751685, 276205278030
Offset: 1

Views

Author

Heinrich Ludwig, Dec 08 2016

Keywords

Comments

Rotations and reflections of placements are not counted. If they are to be counted, see A061998.

Examples

			There are 273 non-equivalent ways to place 5 non-attacking kings on a 5 X 5 board, e.g., this one:
   K...K
   .....
   ..K..
   .....
   K...K
		

Crossrefs

Cf. A061998, A279111 (2 kings), A279112 (3 kings), A279113 (4 kings), A279115 (6 kings), A279116 (7 kings), A279117, A236679.

Programs

  • Magma
    [0,0,0] cat [(n^10 - 90*n^8 + 120*n^7 + 3115*n^6 - 7748*n^5 - 46050*n^4 + 173140*n^3 + 158584*n^2 - 1255952*n + 1252800 + (1/2-(-1)^n/2)*(52*n^5 - 305*n^4 + 180*n^3 + 320*n^2 + 3488*n - 375))/960 : n in [4..30]]; // Wesley Ivan Hurt, Dec 08 2016
  • Maple
    A279114:=n->(n^10 - 90*n^8 + 120*n^7 + 3115*n^6 - 7748*n^5 - 46050*n^4 + 173140*n^3 + 158584*n^2 - 1255952*n + 1252800 + (1/2-(-1)^n/2)*(52*n^5 - 305*n^4 + 180*n^3 + 320*n^2 + 3488*n - 375))/960: 0, 0, 0, seq(A279114(n), n=4..30); # Wesley Ivan Hurt, Dec 08 2016
  • Mathematica
    Join[{0, 0, 0}, Table[(n^10 - 90*n^8 + 120*n^7 + 3115*n^6 - 7748*n^5 - 46050*n^4 + 173140*n^3 + 158584*n^2 - 1255952*n + 1252800 + (1/2 - (-1)^n/2)*(52*n^5 - 305*n^4 + 180*n^3 + 320*n^2 + 3488*n - 375))/960, {n, 4, 30}]] (* Wesley Ivan Hurt, Dec 08 2016 *)
  • PARI
    concat(vector(4), Vec(x^5*(273 +3970*x +24438*x^2 +67866*x^3 +103134*x^4 +66494*x^5 -1418*x^6 -29015*x^7 -4247*x^8 +10650*x^9 +2718*x^10 -2696*x^11 -672*x^12 +382*x^13 +62*x^14 -19*x^15) / ((1 -x)^11*(1 +x)^6) + O(x^30))) \\ Colin Barker, Dec 08 2016
    

Formula

a(n) = (n^10 - 90*n^8 + 120*n^7 + 3115*n^6 - 7748*n^5 - 46050*n^4 + 173140*n^3 + 158584*n^2 - 1255952*n + 1252800 + (1/2-(-1)^n/2) * (52*n^5 - 305*n^4 + 180*n^3 + 320*n^2 + 3488*n - 375))/960 for n >= 4.
a(n) = 5*a(n-1) - 4*a(n-2) - 20*a(n-3) + 40*a(n-4) + 16*a(n-5) - 100*a(n-6) + 44*a(n-7) + 110*a(n-8) - 110*a(n-9) - 44*a(n-10) + 100*a(n-11) - 16*a(n-12) - 40*a(n-13) + 20*a(n-14) + 4*a(n-15) - 5*a(n-16) + a(n-17) for n >= 21.
G.f.: x^5*(273 +3970*x +24438*x^2 +67866*x^3 +103134*x^4 +66494*x^5 -1418*x^6 -29015*x^7 -4247*x^8 +10650*x^9 +2718*x^10 -2696*x^11 -672*x^12 +382*x^13 +62*x^14 -19*x^15) / ((1 -x)^11*(1 +x)^6). - Colin Barker, Dec 08 2016

A194788 Number of ways to place 7 nonattacking kings on an n X n board.

Original entry on oeis.org

0, 0, 0, 0, 242, 51504, 2484382, 44601420, 450193818, 3112919712, 16471667554, 71393226972, 265069706646, 869583076752, 2577681275622, 7020477731884, 17794428237522, 42397762374912, 95726217156906, 206149749502012, 425731784898894, 846919172059632
Offset: 1

Views

Author

Andrew Woods, Sep 02 2011

Keywords

Crossrefs

Formula

a(n) = (n^14 - 189n^12 + 252n^11 + 15211n^10 - 38640n^9 - 649215n^8 + 2408700n^7 + 14771764n^6 - 75856200n^5 - 144099396n^4 + 1198867488n^3 - 255900576n^2 - 7543005120n + 10617929280)/5040, n>=6. - Andrew Woods, Sep 02 2011
G.f.: 2*x^5*(1930*x^15 - 20052*x^14 + 87663*x^13 - 265681*x^12 + 816798*x^11 - 2117376*x^10 + 2865281*x^9 + 557737*x^8 - 6577818*x^7 + 3848604*x^6 + 8828017*x^5 - 9464319*x^4 - 6316750*x^3 - 868616*x^2 - 23937*x - 121)/ (x-1)^15. - Vaclav Kotesovec, Nov 06 2011

A286440 Number of ways to tile an n X n X n triangular area with five 2 X 2 X 2 triangular tiles and an appropriate number (= n^2-20) of 1 X 1 X 1 tiles.

Original entry on oeis.org

0, 546, 14064, 157248, 1056516, 5086902, 19399860, 62311740, 175452816, 445146906, 1037833944, 2255992584, 4622997276, 9007684494, 16802136156, 30169344996, 52381036968, 88270019922, 144826036032, 231969248016, 363541216308, 558559556262, 842789431428, 1250692671180
Offset: 5

Views

Author

Heinrich Ludwig, May 12 2017

Keywords

Comments

Rotations and reflections of tilings are counted. Tiles of the same size are not distinguishable.
For an analogous problem concerning square tiles, see A061998.

Examples

			There are 546 ways of tiling a triangular area of side 6 with 5 tiles of side 2 and an appropriate number (= 16) of tiles of side 1. See illustration in links section.
		

Crossrefs

Programs

  • PARI
    concat(0, Vec(6*x^6*(91 + 1343*x + 5429*x^2 + 1703*x^3 - 4419*x^4 - 789*x^5 + 2379*x^6 - 627*x^7 - 76*x^8 - 14*x^9 + 20*x^10) / (1 - x)^11 + O(x^40))) \\ Colin Barker, May 12 2017

Formula

a(n) = (n^10 -15*n^9 +5*n^8 +930*n^7 -3325*n^6 -19863*n^5 +109915*n^4 +155100*n^3 -1365876*n^2 -191592*n +5981760)/120 for n >= 6.
G.f.: 6*x^6*(91 + 1343*x + 5429*x^2 + 1703*x^3 - 4419*x^4 - 789*x^5 + 2379*x^6 - 627*x^7 - 76*x^8 - 14*x^9 + 20*x^10) / (1 - x)^11. - Colin Barker, May 12 2017
Showing 1-10 of 16 results. Next