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 18 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

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

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.

A172226 Number of ways to place 3 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 22, 276, 1474, 5248, 14690, 35012, 74326, 144544, 262398, 450580, 739002, 1166176, 1780714, 2642948, 3826670, 5420992, 7532326, 10286484, 13830898, 18336960, 24002482, 31054276, 39750854, 50385248, 63287950
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

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

Crossrefs

Programs

  • Magma
    I:=[0, 0, 22, 276, 1474, 5248, 14690, 35012]; [n le 8 select I[n] else 7*Self(n-1)-21*Self(n-2)+35*Self(n-3)-35*Self(n-4)+21*Self(n-5)-7*Self(n-6)+Self(n-7): n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Magma
    [0] cat [(n-2)*(n^5+2*n^4-11*n^3-10*n^2+42*n-12)/6: n in [2..30]]; // Vincenzo Librandi, Apr 30 2013
  • Maple
    A172226:=n->`if`(n=1, 0, (n-2)*(n^5 + 2*n^4 - 11*n^3 - 10*n^2 + 42*n - 12)/6); seq(A172226(n), n=1..60); # Wesley Ivan Hurt, Feb 06 2014
  • Mathematica
    CoefficientList[Series[2 x^2 (x^5 - 9 x^4 + 22 x^3 - 2  x^2 - 61 x - 11) / (x-1)^7, {x, 0, 60}], x] (* Vincenzo Librandi, Apr 30 2013 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,0,22,276,1474,5248,14690,35012},30] (* Harvey P. Dale, Apr 08 2022 *)

Formula

a(n) = (n-2)*(n^5 + 2*n^4 - 11*n^3 - 10*n^2 + 42*n - 12)/6, n>=2.
G.f.: 2*x^3*(x^5-9*x^4+22*x^3-2*x^2-61*x-11)/(x-1)^7. - Vaclav Kotesovec, Mar 25 2010
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). - Vincenzo Librandi, Apr 30 2013
a(n) = A232833(n,3). - R. J. Mathar, Apr 11 2024

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

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

Original entry on oeis.org

0, 0, 2, 20, 138, 505, 1547, 3759, 8313, 16350, 30344, 52470, 87212, 138255, 212953, 317065, 461827, 655724, 915038, 1251720, 1688414, 2241365, 2941047, 3808915, 4884893, 6196650, 7795332, 9715914, 12022688, 14759115, 18004709, 21812685, 26280007, 31471000, 37502458
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 A061996.

Examples

			There are 2 non-equivalent ways to place 3 non-attacking kings on a 3 X 3 board:
   K.K   K.K
   ...   ...
   ..K   .K.
		

Crossrefs

Cf. A061996, A279111 (2 kings), A279113 (4 kings), A279114 (5 kings), A279115 (6 kings), A279116 (7 kings), A279117, A236679.

Programs

  • Mathematica
    Table[Boole[n > 1] (n^6 - 27 n^4 + 44 n^3 + 146 n^2 - 404 n + 240 + Boole[OddQ@ n] (8 n^3 - 21 n^2 + 16 n - 51))/48, {n, 35}] (* or *)
    Rest@ CoefficientList[Series[x^3*(2 + 14 x + 76 x^2 + 93 x^3 + 102 x^4 - 17 x^5 - 36 x^6 - x^7 + 8 x^8 - x^9)/((1 - x)^7*(1 + x)^4), {x, 0, 35}], x] (* Michael De Vlieger, Dec 08 2016 *)
  • PARI
    concat(vector(2), Vec(x^3*(2 + 14*x + 76*x^2 + 93*x^3 + 102*x^4 - 17*x^5 - 36*x^6 - x^7 + 8*x^8 - x^9) / ((1 - x)^7*(1 + x)^4) + O(x^60))) \\ Colin Barker, Dec 07 2016

Formula

a(n) = (n^6 - 27*n^4 + 44*n^3 + 146*n^2 - 404*n + 240 + IF(MOD(n, 2) = 1, 8*n^3 - 21*n^2 + 16*n - 51))/48 for n >=2.
a(n) = 3*a(n-1) + a(n-2) - 11*a(n-3) + 6*a(n-4) + 14*a(n-5) - 14*a(n-6) - 6*a(n-7) + 11*a(n-8) - a(n-9) - 3*a(n-10) + a(n-11).
From Colin Barker, Dec 07 2016: (Start)
a(n) = (n^6 - 27*n^4 + 44*n^3 + 146*n^2 - 404*n + 240)/48 for n>1.
a(n) = (n^6 - 27*n^4 + 52*n^3 + 125*n^2 - 388*n + 189)/48 for n>1.
G.f.: x^3*(2 + 14*x + 76*x^2 + 93*x^3 + 102*x^4 - 17*x^5 - 36*x^6 - x^7 + 8*x^8 - x^9) / ((1 - x)^7*(1 + x)^4).
(End)

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

Original entry on oeis.org

0, 0, 0, 48, 600, 3108, 10388, 27328, 61668, 124900, 233288, 409008, 681408, 1088388, 1677900, 2509568, 3656428, 5206788, 7266208, 9959600, 13433448, 17858148, 23430468, 30376128, 38952500, 49451428, 62202168, 77574448, 95981648, 117884100
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 07 2011

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- 4 x^3 (12 x^6 - 67 x^5 + 140 x^4 - 112 x^3 - 21 x^2 + 66 x + 12) / (x - 1)^7, {x, 0, 40}], x] (* Vincenzo Librandi, Jun 01 2013 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,0,0,48,600,3108,10388,27328,61668,124900},30] (* Harvey P. Dale, Aug 04 2024 *)

Formula

Explicit formula: a(n) = 1/6*n^2*(n^4 -27*n^2 +194), n>=4.
G.f.: -4*x^4*(12*x^6 -67*x^5 +140*x^4 -112*x^3 -21*x^2 +66*x +12)/(x-1)^7.

A286438 Number of ways to tile an n X n X n triangular area with three 2 X 2 X 2 triangular tiles and an appropriate number (= n^2-12) of 1 X 1 X 1 tiles.

Original entry on oeis.org

0, 4, 63, 494, 2247, 7396, 19739, 45518, 94259, 179732, 321031, 543774, 881423, 1376724, 2083267, 3067166, 4408859, 6205028, 8570639, 11641102, 15574551, 20554244, 26791083, 34526254, 44033987, 55624436, 69646679, 86491838, 106596319, 130445172, 158575571, 191580414
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 A286445. Tiles of the same size are not distinguishable.
For an analogous problem concerning square tiles, see A061996.

Examples

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

Crossrefs

Programs

  • PARI
    concat(0, Vec(x^4*(4 + 35*x + 137*x^2 - 28*x^3 - 24*x^4 - 15*x^5 + 11*x^6) / (1 - x)^7 + O(x^30))) \\ Colin Barker, May 11 2017

Formula

a(n) = (n^6 - 9*n^5 + 6*n^4 + 153*n^3 - 361*n^2 - 564*n + 1848)/6 for n>=4.
G.f.: x^4*(4 + 35*x + 137*x^2 - 28*x^3 - 24*x^4 - 15*x^5 + 11*x^6) / (1 - x)^7. - Colin Barker, May 11 2017
Showing 1-10 of 18 results. Next