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

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

Original entry on oeis.org

0, 0, 26, 232, 1124, 3896, 10894, 26192, 56296, 110960, 204130, 355000, 589196, 940072, 1450134, 2172576, 3172944, 4530912, 6342186, 8720520, 11799860, 15736600, 20711966, 26934512, 34642744, 44107856, 55636594, 69574232
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
    [(n*(n-2)*(2*n^4 -4*n^3 +7*n^2 -6*n +4) +3*(n mod 2))/12: n in [1..40]]; // G. C. Greubel, Apr 16 2022
    
  • Mathematica
    CoefficientList[Series[2x^2(3x^4 +18x^3 +48x^2 +38x +13)/((1-x)^7 (x+1)), {x, 0, 30}], x] (* Vincenzo Librandi, May 26 2013 *)
  • SageMath
    [(n*(n-2)*(2*n^4 -4*n^3 +7*n^2 -6*n +4) +3*(n%2))/12 for n in (1..40)] # G. C. Greubel, Apr 16 2022

Formula

Explicit formulas (Karl Fabel, 1966): (Start)
a(n) = n*(n-2)*(2*n^4 - 4*n^3 + 7*n^2 - 6*n + 4)/12 if n is even.
a(n) = (n-1)*(2*n^5 - 6*n^4 + 9*n^3 - 11*n^2 + 5*n - 3)/12 if n is odd. (End)
G.f.: 2*x^3*(13+38*x+48*x^2+18*x^3+3*x^4)/((1-x)^7*(1+x)). - .Vaclav Kotesovec, Mar 25 2010
a(n) = (2*(n-2)*n*(2*n^4-4*n^3+7*n^2-6*n+4)-3*(-1)^n+3)/24. - Bruno Berselli, May 26 2013
E.g.f.: (1/24)*( (3 - 6*x + 6*x^2 + 100*x^3 + 130*x^4 + 44*x^5 + 4*x^6)*exp(x) - 3*exp(-x) ). - G. C. Greubel, Apr 16 2022

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

A172225 Number of ways to place 2 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 2, 24, 96, 260, 570, 1092, 1904, 3096, 4770, 7040, 10032, 13884, 18746, 24780, 32160, 41072, 51714, 64296, 79040, 96180, 115962, 138644, 164496, 193800, 226850, 263952, 305424, 351596, 402810, 459420, 521792, 590304
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

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

References

  • Christian Poisson, Echecs et mathematiques, Rex Multiplex 29/1990, p. 829.

Crossrefs

Programs

  • Magma
    I:=[0, 2, 24, 96, 260]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Magma
    [n*(n-1)*(n^2+n-4)/2: n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
  • Mathematica
    Table[n (n - 1) (n^2 + n - 4) / 2, {n, 40}] (* Vincenzo Librandi, Apr 30 2013 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,2,24,96,260},40] (* Harvey P. Dale, Jun 04 2023 *)

Formula

Explicit formula (Christian Poisson, 1990): a(n) = n*(n-1)*(n^2+n-4)/2.
G.f.: 2*x^2*(2*x^2-7*x-1)/(x-1)^5. - Vaclav Kotesovec, Mar 25 2010
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Vincenzo Librandi, Apr 30 2013
a(n) = 2*A239352(n). - R. J. Mathar, Jan 09 2018
a(n) = A232833(n,2). - R. J. Mathar, Apr 11 2024

A172132 Number of ways to place 2 nonattacking knights on an n X n board.

Original entry on oeis.org

0, 6, 28, 96, 252, 550, 1056, 1848, 3016, 4662, 6900, 9856, 13668, 18486, 24472, 31800, 40656, 51238, 63756, 78432, 95500, 115206, 137808, 163576, 192792, 225750, 262756, 304128, 350196, 401302, 457800, 520056, 588448, 663366
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=2 of A244081.

Programs

  • Magma
    I:=[0, 6, 28, 96, 252]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Magma
    [(n-1)*(n+4)*(n^2-3*n+4)/2: n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Mathematica
    Table[(n-1)(n+4)(n^2 -3n +4)/2, {n, 40}] (* Vincenzo Librandi, Apr 30 2013 *)
  • SageMath
    [(n-1)*(n+4)*(n^2-3*n+4)/2 for n in (1..40)] # G. C. Greubel, Apr 18 2022

Formula

a(n) = (n - 1)*(n + 4)*(n^2 - 3*n + 4)/2.
G.f.: 2*(12*x^4-39*x^3+37*x^2-20*x+4)/(x-1)^5. - Vaclav Kotesovec, Mar 25 2010
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5). - Vincenzo Librandi, Apr 30 2013
E.g.f.: (1/2)*(16 + (-16 + 16*x - 2*x^2 + 6*x^3 + x^4)*exp(x)). - G. C. Greubel, Apr 18 2022

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)

A172141 Number of ways to place 2 nonattacking nightriders on an n X n board.

Original entry on oeis.org

0, 6, 28, 96, 240, 518, 980, 1712, 2784, 4310, 6380, 9136, 12688, 17206, 22820, 29728, 38080, 48102, 59964, 73920, 90160, 108966, 130548, 155216, 183200, 214838, 250380, 290192, 334544, 383830, 438340, 498496, 564608, 637126
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

Comments

A nightrider is a fairy chess piece that can move (proportionate to how a knight moves) in any direction.

References

  • Christian Poisson, Echecs et mathematiques, Rex Multiplex 29/1990, p.829

Crossrefs

Programs

  • Magma
    [(n/12)*(3*(-1)^n -(11 -18*n +10*n^2 -6*n^3)): n in [1..40]]; // G. C. Greubel, Apr 21 2022
    
  • Mathematica
    CoefficientList[Series[2*x*(3+2*x+x^2)*(1+x+2*x^2)/((1-x)^5*(1+x)^2), {x,0,40}], x] (* Vincenzo Librandi, May 27 2013 *)
  • SageMath
    [(n/12)*(3*(-1)^n -(11 -18*n +10*n^2 -6*n^3)) for n in (1..40)] # G. C. Greubel, Apr 21 2022

Formula

Explicit formula (Christian Poisson, 1990): a(n) = n*(3*n^3 - 5*n^2 + 9*n - 4)/6 if n is even and a(n) = n*(n - 1)*(3*n^2 - 2*n + 7)/6 if n is odd.
G.f.: 2*x^2*(3+2*x+x^2)*(1+x+2*x^2)/((1-x)^5*(1+x)^2). - Vaclav Kotesovec, Mar 25 2010
From G. C. Greubel, Apr 21 2022: (Start)
a(n) = (1/12)*n*(3*(-1)^n - (11 - 18*n + 10*n^2 - 6*n^3)).
E.g.f.: (x/12)*(-3*exp(-x) + (3 + 30*x + 26*x^2 + 6*x^3)exp(x)). (End)

A177755 Number of ways to place 2 nonattacking bishops on an n X n toroidal board.

Original entry on oeis.org

0, 4, 18, 80, 200, 468, 882, 1600, 2592, 4100, 6050, 8784, 12168, 16660, 22050, 28928, 36992, 46980, 58482, 72400, 88200, 106964, 128018, 152640, 180000
Offset: 1

Views

Author

Vaclav Kotesovec, May 13 2010

Keywords

Crossrefs

Cf. A172123.

Programs

  • Mathematica
    Table[(n^2 (2n^2-4n+3+(-1)^n))/4,{n,30}] (* or *) LinearRecurrence[ {2,2,-6,0,6,-2,-2,1},{0,4,18,80,200,468,882,1600},30] (* Harvey P. Dale, Mar 06 2013 *)
    CoefficientList[Series[- 2 x (x^5 + 8 x^4 + 14 x^3 + 18 x^2 + 5 x + 2) / ((x - 1)^5 (x + 1)^3), {x, 0, 50}], x] (* Vincenzo Librandi, May 31 2013 *)

Formula

Explicit formula: 1/4*n^2*(2*n^2-4*n+3+(-1)^n).
G.f.: -2*x^2*(x^5+8*x^4+14*x^3+18*x^2+5*x+2)/((x-1)^5*(x+1)^3).
a(1)=0, a(2)=4, a(3)=18, a(4)=80, a(5)=200, a(6)=468, a(7)=882, a(8)=1600, a(n)=2*a(n-1)+2*a(n-2)-6*a(n-3)+6*a(n-5)-2*a(n-6)-2*a(n-7)+a(n-8). - Harvey P. Dale, Mar 06 2013

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

A172137 Number of ways to place 2 nonattacking zebras on an n X n board.

Original entry on oeis.org

0, 6, 36, 112, 276, 582, 1096, 1896, 3072, 4726, 6972, 9936, 13756, 18582, 24576, 31912, 40776, 51366, 63892, 78576, 95652, 115366, 137976, 163752, 192976, 225942, 262956, 304336, 350412, 401526, 458032, 520296, 588696, 663622, 745476, 834672, 931636, 1036806
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

Comments

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

References

  • Christian Poisson, Echecs et mathematiques, Rex Multiplex 29/1990, p. 829.

Crossrefs

Programs

  • Magma
    [n eq 1 select 0 else (n^4 -9*n^2 +40*n -48)/2: n in [1..50]]; // G. C. Greubel, Apr 19 2022
    
  • Mathematica
    CoefficientList[Series[2x(3+3*x-4*x^2+8*x^3-4*x^4)/(1-x)^55, {x, 0, 40}], x] (* Vincenzo Librandi, May 26 2013 *)
  • SageMath
    [(n^4 -9*n^2 +40*n -48 +16*bool(n==1))/2 for n in (1..50)] # G. C. Greubel, Apr 19 2022

Formula

a(n) = (n^4 - 9*n^2 + 40*n - 48)/2, n >= 2. (Christian Poisson, 1990)
G.f.: 2*x^2*(3+3*x-4*x^2+8*x^3-4*x^4)/(1-x)^5. - Vaclav Kotesovec, Mar 25 2010
E.g.f.: (1/2)*(16*(3+x) + (-48 + 32*x - 2*x^2 + 6*x^3 + x^4)*exp(x)). - G. C. Greubel, Apr 19 2022
Showing 1-10 of 17 results. Next