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 15 results. Next

A172127 Number of ways to place 4 nonattacking bishops on an n X n board.

Original entry on oeis.org

0, 0, 8, 260, 2728, 16428, 70792, 242856, 706048, 1809464, 4199064, 8992684, 18024072, 34170724, 61784632, 107243472, 179645376, 291667440, 460615272, 709686228, 1069477928, 1579767068, 2291594536, 3269684088, 4595235136
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

References

  • E. Bonsdorff, K. Fabel, O. Riihimaa, Schach und Zahl, 1966, p. 51-63

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); [0,0] cat Coefficients(R!(4*x^3*(6*x^8 +57*x^7 +316*x^6 +763*x^5 +1056*x^4 +791*x^3 +316*x^2 +53*x +2)/((1-x)^9*(x+1)^3))); // G. C. Greubel, Nov 04 2018
  • Mathematica
    CoefficientList[Series[-4 x^2 (6 x^8 + 57 x^7 + 316 x^6 + 763 x^5 + 1056 x^4 + 791 x^3 + 316 x^2 + 53 x + 2) / ((x-1)^9 (x+1)^3), {x, 0, 50}], x] (* Vincenzo Librandi, May 02 2013 *)
    LinearRecurrence[{6,-12,2,27,-36,0,36,-27,-2,12,-6,1},{0,0,8,260,2728,16428,70792,242856,706048,1809464,4199064,8992684},30] (* Harvey P. Dale, Dec 09 2017 *)
  • PARI
    x='x+O('x^50); concat([0,0], Vec(4*x^3*(6*x^8 +57*x^7 +316*x^6 +763*x^5 +1056*x^4 +791*x^3 +316*x^2 +53*x +2)/((1-x)^9*(x+1)^3))) \\ G. C. Greubel, Nov 04 2018
    

Formula

Explicit formula (Karl Fabel, 1966): a(n) = n(n - 2)(15n^6 - 90n^5 + 260n^4 - 524n^3 + 727n^2 - 646n + 348)/360 if n is even and a(n) = (n - 1)(n - 2)(15n^6 - 75n^5 + 185n^4 - 339n^3 + 388n^2 - 258n + 180)/360 if n is odd.
G.f.: 4*x^3*(6*x^8 +57*x^7 +316*x^6 +763*x^5 +1056*x^4 +791*x^3 +316*x^2 +53*x +2)/((1-x)^9*(x+1)^3). - Vaclav Kotesovec, Mar 25 2010

A172129 Number of ways to place 5 nonattacking bishops on an n X n board.

Original entry on oeis.org

0, 0, 0, 112, 3368, 39680, 282248, 1444928, 5865552, 20014112, 59673360, 159698416, 391202680, 890095584, 1902427800, 3853570560, 7450556064, 13829016768, 24759442464, 42930138864, 72328779720, 118747638592
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

Comments

For any fixed value of k>1, a(n) = n^(2k) /k! - 2n^(2k - 1) /3/(k - 2)! + ...

Crossrefs

Programs

  • Mathematica
    Rest[CoefficientList[Series[8*x^4*(14 +337*x +2574*x^2 +9871*x^3 +22040*x^4 +31334*x^5 +28808*x^6 +17522*x^7 +6666*x^8 +1593*x^9 +186*x^10 +15*x^11)/((1-x)^11*(1+x)^5), {x, 0, 50}], x]] (* Vincenzo Librandi, May 02 2013 *)
  • SageMath
    [(1/360)*(n-2)*( n*(1344 -2844*n +3326*n^2 -2592*n^3 +1435*n^4 -590*n^5 +177*n^6 -34*n^7 +3*n^8) -15*(54 -58*n +22*n^2 -3*n^3)*(n%2) ) for n in (1..50)] # G. C. Greubel, Apr 17 2022

Formula

a(n) = n*(n-2)*(3*n^8 - 34*n^7 + 177*n^6 - 590*n^5 + 1435*n^4 - 2592*n^3 + 3326*n^2 - 2844*n + 1344)/360 if n is even.
a(n) = (n-1)*(n-2)*(n-3)*(3*n^7 - 22*n^6 + 80*n^5 - 204*n^4 + 379*n^3 - 464*n^2 + 378*n - 270)/360 if n is odd.
G.f.: 8*x^4*(14 + 337*x + 2574*x^2 + 9871*x^3 + 22040*x^4 + 31334*x^5 + 28808*x^6 + 17522*x^7 + 6666*x^8 + 1593*x^9 + 186*x^10 + 15*x^11) / ((1-x)^11*(1+x)^5). - Vaclav Kotesovec, Mar 25 2010
a(n) = (1/360)*(n-2)*( n*(1344 -2844*n +3326*n^2 -2592*n^3 +1435*n^4 -590*n^5 +177*n^6 -34*n^7 +3*n^8) -15*(54 -58*n +22*n^2 -3*n^3)*(1-(-1)^n)/2 ). - G. C. Greubel, Apr 17 2022

A172134 Number of ways to place 3 nonattacking knights on an n X n board.

Original entry on oeis.org

0, 4, 36, 276, 1360, 4752, 13340, 32084, 68796, 135040, 247152, 427380, 705144, 1118416, 1715220, 2555252, 3711620, 5272704, 7344136, 10050900, 13539552, 17980560, 23570764, 30535956, 39133580, 49655552, 62431200, 77830324
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

References

  • E. Bonsdorff, K. Fabel, O. Riihimaa, Schach und Zahl, 1966, p. 51-63

Crossrefs

Column k=3 of A244081.

Programs

  • Magma
    [n le 3 select (n*(n-1))^2 else (n-2)*(n+5)*(n^4 -3*n^3 -8*n^2 +66*n -108)/6: n in [1..50]]; // G. C. Greubel, Apr 18 2022
    
  • Mathematica
    CoefficientList[Series[4x(3x^8 -20x^7 +43x^6 -38x^5 +23x^4 -11x^3 -27x^2 -2x -1)/ (x-1)^7, {x, 0, 40}], x] (* Vincenzo Librandi, May 02 2013 *)
  • SageMath
    def A172134(n):
        if (n<4): return (n*(n-1))^2
        else: return (n-2)*(n+5)*(n^4 -3*n^3 -8*n^2 +66*n -108)/6
    [A172134(n) for n in (1..50)] # G. C. Greubel, Apr 18 2022

Formula

Explicit formula (Karl Fabel, 1966): a(n) = (n - 2)*(n + 5)*(n^4 - 3*n^3 - 8*n^2 + 66*n - 108)/6, for n >= 4.
G.f.: 4*x^2*(3*x^8-20*x^7+43*x^6-38*x^5+23*x^4-11*x^3-27*x^2-2*x-1)/(x-1)^7. - Vaclav Kotesovec, Mar 25 2010
From G. C. Greubel, Apr 18 2022: (Start)
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), for n >= 11.
E.g.f.: (1/6)*(-1080 - 312*x + 12*x^2 +13*x^3 + (1080 - 768*x + 228*x^2 + 38*x^4 + 15*x^5 + x^6)*exp(x)). (End)

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

A176886 Number of ways to place 6 nonattacking bishops on an n X n board.

Original entry on oeis.org

0, 0, 0, 16, 1960, 53744, 692320, 5599888, 33001664, 154215760, 603563504, 2052729728, 6229649352, 17202203680, 43870041520, 104531112928, 234870173248, 501360888160
Offset: 1

Views

Author

Vaclav Kotesovec, Apr 28 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- 8 x^3 (90 x^15 + 1332 x^14 + 15417 x^13 + 93042 x^12 + 372376 x^11 + 983864 x^10 + 1834807 x^9 + 2423054 x^8 + 2310242 x^7 + 1568260 x^6 + 748519 x^5 + 239742 x^4 + 48236 x^3 + 5264 x^2 + 233 x + 2) / ((x - 1)^13 (x + 1)^7), {x, 0, 50}], x] (* Vincenzo Librandi, May 31 2013 *)

Formula

From Vaclav Kotesovec, Apr 27 2010: (Start)
Explicit formula: a(n) = n*(n-2)*(126*n^10 -2268*n^9 +18774*n^8 -97216*n^7 +361165*n^6 -1029454*n^5 +2283178*n^4 -3841960*n^3 +4676932*n^2 -3808152*n +1640160)/90720 if n is even and a(n) = (n-1)*(n-3)*(126*n^10 -2016*n^9 +14868*n^8 -69244*n^7 +234017*n^6 -607984*n^5 +1211879*n^4 -1797328*n^3 +1953593*n^2 -1550820*n +722925)/90720 if n is odd.
G.f.: -8x^4*(90x^15 +1332x^14 +15417x^13 +93042x^12 +372376x^11 +983864x^10 +1834807x^9 +2423054x^8 +2310242x^7 +1568260x^6 +748519x^5 +239742x^4 +48236x^3 +5264x^2 +233x +2)/((x-1)^13*(x+1)^7). (End)

A201862 Number of ways to place k nonattacking bishops on an n X n board, sum over all k>=0.

Original entry on oeis.org

1, 2, 9, 70, 729, 9918, 167281, 3423362, 82609921, 2319730026, 74500064809, 2711723081550, 110568316431609, 5016846683306758, 251180326892449969, 13806795579059621930, 827911558468860287041, 53940895144894708523922, 3799498445458163685753481, 288400498147873552894868886
Offset: 0

Views

Author

Vaclav Kotesovec, Dec 06 2011

Keywords

Comments

Also the number of vertex covers and independent vertex sets of the n X n bishop graph.

Crossrefs

Programs

  • Mathematica
    knbishops[k_,n_]:=(If[n==1,If[k==1,1,0],(-1)^k/(2n-k)!
    *Sum[Binomial[2n-k,n-k+i]*Sum[(-1)^m*Binomial[n-i,m]*m^Floor[n/2]*(m+1)^Floor[(n+1)/2],{m,1,n-i}]
    *Sum[(-1)^m*Binomial[n-k+i,m]*m^Floor[(n+1)/2]*(m+1)^Floor[n/2],{m,1,n+i-k}],{i,Max[0,k-n],Min[k,n]}]]);
    Table[1+Sum[knbishops[k,n],{k,1,2n-1}],{n,1,25}]

Formula

a(n) = A216078(n+1) * A216332(n+1). - Andrew Howroyd, May 08 2017

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 01 2024

A187239 Number of ways to place 7 nonattacking bishops on an n X n board.

Original entry on oeis.org

0, 0, 0, 0, 440, 38368, 1022320, 14082528, 126490352, 837543200, 4412818240, 19447224864, 74255991784, 251997948736, 774861621936, 2191005028672, 5764306674400, 14243327787456, 33309659739904, 74194554880960, 158241369977880, 324605935279648, 642894402918768
Offset: 1

Views

Author

Vaclav Kotesovec, Mar 07 2011

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- 8 x^4 (630 x^18 + 10620 x^17 + 153525 x^16 + 1211058 x^15 + 6621390 x^14 + 24647178 x^13 + 66958554 x^12 + 133891418 x^11 + 202680754 x^10 + 232634698 x^9 + 204008900 x^8 + 135332502 x^7 + 67245306 x^6 + 24326718 x^5 + 6174582 x^4 + 1024222 x^3 + 99344 x^2 + 4466 x + 55) / ((x - 1)^15 (x + 1)^9), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 02 2013 *)

Formula

a(n) = n^14/5040 - n^13/180 + 313n^12/4320 - 383n^11/648 + 14797n^10/4320 - 38233n^9/2520 + 3217n^8/60 - 145469n^7/945 + 1546679n^6/4320 - 4297801n^5/6480 + 257903n^4/270 - 3915679n^3/3780 + 1787007n^2/2240 - 318023n/840 + 9503/128 + (-n^8/192 + n^7/8 - 389n^6/288 + 689n^5/80 - 319n^4/9 + 1153n^3/12 - 95965n^2/576 + 20129n/120 - 9503/128)*(-1)^n.
G.f.: -8x^5*(630x^18 + 10620x^17 + 153525x^16 + 1211058x^15 + 6621390x^14 + 24647178x^13 + 66958554x^12 + 133891418x^11 + 202680754x^10 + 232634698x^9 + 204008900x^8 + 135332502x^7 + 67245306x^6 + 24326718x^5 + 6174582x^4 + 1024222x^3 + 99344x^2 + 4466x + 55)/((x-1)^15*(x+1)^9).
a(7) = A002465(7).

A201244 Number of ways to place 3 non-attacking ferses on an n X n board.

Original entry on oeis.org

0, 0, 38, 340, 1630, 5552, 15210, 35828, 75530, 146240, 264702, 453620, 742918, 1171120, 1786850, 2650452, 3835730, 5431808, 7545110, 10301460, 13848302, 18357040, 24025498, 31080500, 39780570, 50418752, 63325550, 78871988, 97472790, 119589680, 145734802
Offset: 1

Views

Author

Vaclav Kotesovec, Nov 28 2011

Keywords

Comments

Fers is a leaper [1,1].

Crossrefs

Programs

  • Magma
    I:=[0, 0, 38, 340, 1630, 5552, 15210, 35828]; [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 +2*n^2+54*n-60)/6: n in [2..35]]; // Vincenzo Librandi, Apr 30 2013
  • Mathematica
    CoefficientList[Series[- 2 x^2 (x^5 + 3 x^4 - 24 x^3 + 24 x^2 + 37 x + 19) / (x-1)^7, {x, 0, 40}], x] (* Vincenzo Librandi, Apr 30 2013 *)

Formula

a(n) = (n-2)*(n^5 + 2n^4 - 11n^3 + 2n^2 + 54n - 60)/6, n>=2.
G.f.: -2x^3*(x^5 + 3x^4 - 24x^3 + 24x^2 + 37x + 19)/(x-1)^7.
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

A172138 Number of ways to place 3 nonattacking zebras on an n X n board.

Original entry on oeis.org

0, 4, 84, 452, 1772, 5596, 14888, 34640, 72712, 140716, 255036, 437968, 718980, 1136092, 1737376, 2582576, 3744848, 5312620, 7391572, 10106736, 13604716, 18056028, 23657560, 30635152, 39246296, 49782956, 62574508, 77990800
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

Comments

A zebra is a (fairy chess) leaper [2,3].

Crossrefs

Programs

  • Magma
    [0,4,84,452,1772] cat [(n^6 -27*n^4 +120*n^3 +74*n^2 -1608*n +2976)/6: n in [6..50]]; // G. C. Greubel, Apr 19 2022
    
  • Mathematica
    CoefficientList[Series[4x(1+14*x-13*x^2+58*x^3-29*x^4-9*x^5+x^6+ 33*x^7- 45*x^8 +23*x^9-4*x^10)/(1-x)^7, {x, 0, 40}], x] (* Vincenzo Librandi, May 27 2013 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,4,84,452,1772,5596,14888,34640,72712,140716,255036,437968},30] (* Harvey P. Dale, Mar 11 2023 *)
  • SageMath
    [0,4,84,452,1772]+[(n^6 -27*n^4 +120*n^3 +74*n^2 -1608*n +2976)/6 for n in (6..50)] # G. C. Greubel, Apr 19 2022

Formula

a(n) = (n^6 - 27*n^4 + 120*n^3 + 74*n^2 - 1608*n + 2976)/6, n >=6.
G.f.: 4*x^2*(1 + 14*x - 13*x^2 + 58*x^3 - 29*x^4 - 9*x^5 + x^6 + 33*x^7 - 45*x^8 + 23*x^9 - 4*x^10)/(1-x)^7. - Vaclav Kotesovec, Mar 25 2010

A177756 Number of ways to place 3 nonattacking bishops on an n X n toroidal board.

Original entry on oeis.org

0, 0, 6, 128, 600, 2688, 7350, 19968, 42336, 89600, 163350, 297600, 490776, 809088, 1242150, 1906688, 2774400, 4036608, 5633766, 7862400, 10613400, 14326400, 18818646, 24718848, 31740000
Offset: 1

Views

Author

Vaclav Kotesovec, May 13 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- 2 x^2 * (3 x^8 + 58 x^7 + 160 x^6 + 518 x^5 + 442 x^4 + 518 x^3 + 160 x^2 + 58 x + 3)/((x - 1)^7 * (x + 1) ^5), {x, 0,1 50}], x] (* Vincenzo Librandi, May 31 2013 *)
    LinearRecurrence[{2,4,-10,-5,20,0,-20,5,10,-4,-2,1},{0,0,6,128,600,2688,7350,19968,42336,89600,163350,297600},30] (* Harvey P. Dale, Aug 31 2024 *)

Formula

Explicit formula: 1/12*(n-2)^2*n^2*(2*n^2-4*n+5+3(-1)^n).
G.f.: -2*x^3*(3*x^8+58*x^7+160*x^6+518*x^5+442*x^4+518*x^3+160*x^2+58*x+3)/((x-1)^7*(x+1)^5).
Showing 1-10 of 15 results. Next