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

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

Original entry on oeis.org

0, 0, 0, 0, 0, 1974, 42368, 397014, 2326320, 10087628, 35464464, 106783320, 285336128, 693331146, 1558986816, 3286192514, 6558317232, 12488282352, 22829958032, 40269324564, 68817690624, 114333609854, 185205015936
Offset: 0

Views

Author

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

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[2*x^5*(987 +10327*x +19768*x^2 -18152*x^3 -2711*x^4 +5149*x^5 +1774*x^6 -2882*x^7 +958*x^8 -98*x^9)/(1-x)^11, {x,0,45}], x] (* Vincenzo Librandi, May 02 2013 *)
  • SageMath
    [0,0,0,0]+[(n-4)*(n^9 +4*n^8 -74*n^7 -176*n^6 +2411*n^5 +1844*n^4 -38194*n^3 +18944*n^2 +236520*n -316320)/120 for n in (4..50)] # G. C. Greubel, May 01 2022

Formula

G.f.: 2*x^5*(987 + 10327*x + 19768*x^2 - 18152*x^3 - 2711*x^4 + 5149*x^5 + 1774*x^6 - 2882*x^7 + 958*x^8 - 98*x^9)/(1 - x)^11.
Recurrence: a(n) = 11*a(n-1) - 55*a(n-2) + 165*a(n-3) - 330*a(n-4) + 462*a(n-5) - 462*a(n-6) + 330*a(n-7) - 165*a(n-8) + 55*a(n-9) - 11*a(n-10) + a(n-11), n >= 15.
Explicit formula (V.Kotesovec, 1992): a(n) = (n - 4)*(n^9 + 4*n^8 - 74*n^7 - 176*n^6 + 2411*n^5 + 1844*n^4 - 38194*n^3 + 18944*n^2 + 236520*n - 316320)/120, n >= 4.
a(n) = A193580(n,5). - 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.

A172227 Number of ways to place 4 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 6, 405, 5024, 31320, 133544, 446421, 1258590, 3126724, 7042930, 14669709, 28658436, 53069000, 93909924, 159819965, 262913874, 419816676, 652912510, 991835749, 1475233800, 2152832664, 3087838016, 4359706245, 6067321574, 8332617060, 11304678954
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- x^2 (4 x^8 - 26 x^7 + 3 x^6 + 303 x^5 - 736 x^4 + 180 x^3 + 1595 x^2 + 351 x + 6) / (x - 1)^9, {x, 0, 50}], x] (* Vincenzo Librandi, May 28 2013 *)

Formula

a(n) = (n^8-30n^6+24n^5+323n^4-504n^3-1110n^2+2760n-1224)/24, n>=3.
G.f.: -x^3*(4*x^8-26*x^7+3*x^6+303*x^5-736*x^4+180*x^3+1595*x^2+351*x+6)/(x-1)^9. - Vaclav Kotesovec, Apr 29 2011
a(n) = A232833(n,4). - R. J. Mathar, Apr 11 2024

Extensions

Corrected a(3) and g.f., Vaclav Kotesovec, Apr 29 2011

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

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

Original entry on oeis.org

0, 0, 0, 12, 575, 9837, 63553, 265008, 853497, 2312925, 5532967, 12037068, 24293243, 46125317, 83243925, 143918272, 239811333, 387002853, 607226187, 929346700, 1391111127, 2041198973, 2941608713, 4170413232, 5824920625, 8025278157, 10918558863, 14683371948, 19535039827, 25731386325
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 07 2011

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^3 (160 x^9 - 963 x^8 + 2054 x^7 - 1308 x^6 - 963 x^5 - 375 x^4 + 5288 x^3 - 5094 x^2 -467 x - 12) / (x - 1)^9, {x, 0, 50}], x] (* Vincenzo Librandi, Jun 01 2013 *)

Formula

Explicit formula: a(n) = 1/24*n^2*(n^6-54*n^4+1019*n^2-6798), n>=5.
G.f.: x^4*(160*x^9 - 963*x^8 + 2054*x^7 - 1308*x^6 - 963*x^5 - 375*x^4 + 5288*x^3 - 5094*x^2 - 467*x - 12)/(x-1)^9.

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

Original entry on oeis.org

0, 0, 1, 14, 277, 2154, 10855, 39926, 120961, 315150, 737089, 1577406, 3150841, 5934034, 10651567, 18332614, 30452605, 49011606, 76753681, 117268590, 175315789, 256949306, 369978631, 524114454, 731604457, 1007394974, 1369985905, 1841600286, 2449309201, 3225197730
Offset: 1

Views

Author

Heinrich Ludwig, Dec 07 2016

Keywords

Comments

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

Examples

			There is 1 way to place 4 non-attacking kings on a 3 X 3 board:
   K.K
   ...
   K.K
		

Crossrefs

Cf. A061997, A279111 (2 kings), A279112 (3 kings), A279114 (5 kings), A279115 (6 kings), A279116 (7 kings), A279117, A236679.

Programs

  • Mathematica
    Table[Boole[n > 2] (n^8 - 54 n^6 + 72 n^5 + 1024 n^4 - 2640 n^3 - 4928 n^2 + 21888 n - 17280 + Boole[OddQ@ n] (14 n^4 - 72 n^3 + 154 n^2 - 240 n - 51))/192, {n, 30}] (* or *)
    Rest@ CoefficientList[Series[x^3*(1 + 10 x + 222 x^2 + 1076 x^3 + 2721 x^4 + 2806 x^5 + 1078 x^6 - 924 x^7 - 639 x^8 + 202 x^9 + 236 x^10 - 40 x^11 - 35 x^12 + 6 x^13)/((1 - x)^9*(1 + x)^5), {x, 0, 30}], x] (* Michael De Vlieger, Dec 08 2016 *)
  • PARI
    concat(vector(2), Vec(x^3*(1 +10*x +222*x^2 +1076*x^3 +2721*x^4 +2806*x^5 +1078*x^6 -924*x^7 -639*x^8 +202*x^9 +236*x^10 -40*x^11 -35*x^12 +6*x^13) / ((1 -x)^9*(1 +x)^5) + O(x^40))) \\ Colin Barker, Dec 08 2016

Formula

a(n) = (n^8 - 54*n^6 + 72*n^5 + 1024*n^4 - 2640*n^3 - 4928*n^2 + 21888*n - 17280 + IF(MOD(n, 2) = 1, 14*n^4 - 72*n^3 + 154*n^2 - 240*n - 51))/192 for n>=3.
a(n) = 4*a(n-1) - a(n-2) - 16*a(n-3) + 19*a(n-4) + 20*a(n-5) - 45*a(n-6) + 45*a(n-8) - 20*a(n-9) - 19*a(n-10) + 16*a(n-11) + a(n-12) - 4*a(n-13) + a(n-14) for n>=17.
G.f.: x^3*(1 +10*x +222*x^2 +1076*x^3 +2721*x^4 +2806*x^5 +1078*x^6 -924*x^7 -639*x^8 +202*x^9 +236*x^10 -40*x^11 -35*x^12 +6*x^13) / ((1 -x)^9*(1 +x)^5). - Colin Barker, Dec 08 2016

A286439 Number of ways to tile an n X n X n triangular area with four 2 X 2 X 2 triangular tiles and an appropriate number (= n^2-16) of 1 X 1 X 1 tiles.

Original entry on oeis.org

0, 1, 25, 747, 7459, 42983, 176373, 575775, 1595487, 3908979, 8701313, 17936083, 34713675, 63739327, 111921149, 189119943, 309074343, 490526475, 758575017, 1146284219, 1696579123, 2464458903, 3519561925, 4949117807, 6861323439, 9389181603, 12694842513, 16974490275
Offset: 3

Views

Author

Heinrich Ludwig, May 11 2017

Keywords

Comments

Rotations and reflections of tilings are counted. If they are to be ignored, see A286446. Tiles of the same size are not distinguishable.
For an analogous problem concerning square tiles, see A061997.

Examples

			There are 25 ways of tiling a triangular area of side 5 with 4 tiles of side 2 and an appropriate number (= 9) of tiles of side 1. See example in links section.
		

Crossrefs

Programs

  • PARI
    concat(0, Vec(x^4*(1 + 16*x + 558*x^2 + 1552*x^3 + 770*x^4 - 1674*x^5 + 306*x^6 + 144*x^7 + 45*x^8 - 38*x^9) / (1 - x)^9 + O(x^60))) \\ Colin Barker, May 12 2017

Formula

a(n) = (n^8 -12*n^7 +6*n^6 +432*n^5 -1279*n^4 -4692*n^3 +20592*n^2 +13320*n -91800)/24, for n>=5.
G.f.: x^4*(1 + 16*x + 558*x^2 + 1552*x^3 + 770*x^4 - 1674*x^5 + 306*x^6 + 144*x^7 + 45*x^8 - 38*x^9) / (1 - x)^9. - Colin Barker, May 12 2017
Showing 1-10 of 16 results. Next