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-7 of 7 results.

A085801 Maximum number of nonattacking queens on an n X n toroidal board.

Original entry on oeis.org

1, 1, 1, 2, 5, 4, 7, 6, 7, 9, 11, 10, 13, 13, 13, 14, 17, 16, 19, 18, 19, 21, 23, 22, 25, 25, 25, 26, 29, 28, 31, 30, 31, 33, 35, 34, 37, 37, 37, 38, 41, 40, 43, 42, 43, 45, 47, 46, 49, 49, 49, 50, 53, 52, 55, 54, 55, 57, 59, 58, 61, 61, 61, 62, 65, 64, 67, 66
Offset: 1

Views

Author

Konrad Schlude, Jul 24 2003

Keywords

Comments

Independence number of the queens' graph on toroidal n X n board. - Andrey Zabolotskiy, Dec 11 2016

Examples

			Four non-attacking queens can be placed on a 6 X 6 toroidal board:
......
..Q...
....Q.
.Q....
...Q..
......
But five queens cannot. Hence a(6) = 4.
		

References

  • G. Polya: Über die 'Doppelt-Periodischen' Loesungen des n-Damen-Problems, in: W. Ahrens: Mathematische Unterhaltungen und Spiele, Teubner, Leipzig, 1918, 364-374. Reprinted in: G. Polya: Collected Works, Vol. V, 237-247.

Crossrefs

Programs

  • Mathematica
    (* Explicit formula, based on an article by Monsky: *)
    Table[n-1/6*(2*Cos[Pi*n/2]-3*Cos[Pi*n/3]+5*Cos[2*Pi*n/3]-Cos[Pi*n/6]-Cos[5*Pi*n/6]+3*Cos[Pi*n]+7),{n,1,100}] (* Vaclav Kotesovec, Dec 13 2010 *)
  • PARI
    a(n)=n-1/6*(2*cos(Pi*n/2)-3*cos(Pi*n/3)+5*cos(2*Pi*n/3)-cos(Pi*n/6)-cos(5*Pi*n/6)+3*cos(Pi*n)+7);
    vector(60,n,round(a(n))) \\ Joerg Arndt, Dec 13 2010

Formula

G.f.: (2*x^12 - x^11 + 2*x^10 + 2*x^9 + x^8 - x^7 + 3*x^6 - x^5 + 3*x^4 + x^3 + 1)/(x^13 - x^12 - x + 1) = (2*x^12 - x^11 + 2*x^10 + 2*x^9 + x^8 - x^7 + 3*x^6 - x^5 + 3*x^4 + x^3 + 1)/((x - 1)^2*(x + 1)*(x^2 + 1)*(x^2 - x + 1)*(x^2 + x + 1)*(x^4 - x^2 + 1)). - Joerg Arndt, Dec 13 2010
From Andrey Zabolotskiy, Dec 11 2016: (Start)
a(n) = n if n = 1, 5, 7, 11 (mod 12);
a(n) = n-1 if n = 2, 10 (mod 12);
a(n) = n-2 otherwise.
(End)

A173775 Number of ways to place 5 nonattacking queens on an n X n toroidal board.

Original entry on oeis.org

0, 0, 0, 0, 10, 0, 882, 13312, 85536, 561440, 2276736, 9471744, 27991470, 85725696, 209107890, 525062144, 1116665944, 2437807104, 4691672964, 9234168960, 16462896030, 29919532544, 50215537658, 85687824384, 136944081500
Offset: 1

Views

Author

Vaclav Kotesovec, Feb 24 2010

Keywords

Crossrefs

Formula

a(n) = (1/120)*n^10 - (1/3)*n^9 + (143/24)*n^8 - (373/6*n^7) + (99377/240)*n^6 - (3603/2)*n^5 + (119627/24)*n^4 - (23833/3)*n^3 + (16342/3)*n^2 + ((1/24)*n^8 - (3/2)*n^7 + (1111/48)*n^6 - (391/2)*n^5 + (7595/8)*n^4 - 2487*n^3 + (8032/3)*n^2)*(-1)^n + ((9/2)*n^4 - 78*n^3 + 374*n^2)*cos(Pi*n/2) + ((8/3)*n^4 - (128/3)*n^3 + (656/3)*n^2)*cos(2*Pi*n/3) + (80/3)*n^2*cos(Pi*n/3) + (16/5)*n^2*cos(2*Pi*n/5) + (16/5)*n^2*cos(Pi*n/5)*(-1)^n.
Recurrence: a(n) = -3a(n-1) - 5a(n-2) - 5a(n-3) + 2a(n-4) + 17a(n-5) + 37a(n-6) + 49a(n-7) + 35a(n-8) - 16a(n-9) - 101a(n-10) - 185a(n-11) - 215a(n-12) - 139a(n-13) + 56a(n-14) + 321a(n-15) + 544a(n-16) + 588a(n-17) + 368a(n-18) - 99a(n-19) - 656a(n-20) - 1069a(n-21) - 1111a(n-22) - 689a(n-23) + 84a(n-24) + 929a(n-25) + 1488a(n-26) + 1506a(n-27) + 939a(n-28) - 939a(n-30) - 1506a(n-31) - 1488a(n-32) - 929a(n-33) - 84a(n-34) + 689a(n-35) + 1111a(n-36) + 1069a(n-37) + 656a(n-38) + 99a(n-39)-368a(n-40) - 588a(n-41) - 544a(n-42) - 321a(n-43) - 56a(n-44) + 139a(n-45) + 215a(n-46) + 185a(n-47) + 101a(n-48) + 16a(n-49) - 35a(n-50) - 49a(n-51) - 37a(n-52) - 17a(n-53) - 2a(n-54) + 5a(n-55) + 5a(n-56) + 3a(n-57) + a(n-58).

A172531 Number of ways to place 4 nonattacking knights on an n X n toroidal board.

Original entry on oeis.org

0, 0, 0, 228, 600, 12357, 68796, 275888, 872532, 2344025, 5580762, 12107196, 24392446, 46261537, 83426400, 144157632, 240119696, 387393921, 607715342, 929951100
Offset: 1

Views

Author

Vaclav Kotesovec, Feb 06 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^3 (192 x^13 - 1728 x^12 + 7452 x^11 - 21238 x^10 + 46658 x^9 - 84582 x^8 + 125397 x^7 - 144875 x^6 + 124920 x^5 - 79904 x^4 + 39969 x^3 - 15165 x^2 + 1452 x - 228) / (x - 1)^9, {x, 0, 50}], x] (* Vincenzo Librandi, May 29 2013 *)

Formula

a(n) = n^2*(n^6 - 54*n^4 + 1115*n^2 - 8934)/24, n>=9.
G.f.: x^4 * (192*x^13 -1728*x^12 +7452*x^11 -21238*x^10 +46658*x^9 -84582*x^8 +125397*x^7 -144875*x^6 +124920*x^5 -79904*x^4 +39969*x^3 -15165*x^2 +1452*x -228) / (x-1)^9. - Vaclav Kotesovec, Mar 25 2010

A178722 Number of ways to place 6 nonattacking queens on an n X n toroidal board.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 196, 3072, 42768, 550000, 3573856, 25009344, 102800672, 454967744, 1441238400, 4811118592, 12616778208, 34692705648, 79514466480, 189770459200, 392908083876, 842040318416, 1610365515264, 3172863442176, 5692888800000
Offset: 1

Views

Author

Vaclav Kotesovec, Jun 07 2010

Keywords

Comments

Previous recurrence (order 142) was right, but Artem M. Karavaev and his team found (Jun 19 2011) another recurrence with smaller order (124).

Crossrefs

Programs

  • Mathematica
    (* General formulas (denominator and recurrence) for k nonattacking queens on an n X n toroidal board: *) inversef[j_]:=(m=2;While[j>2*Fibonacci[m-1],m=m+1];m); denomt[k_,par_]:=(x-1)^(2k+1)*Product[Cyclotomic[j,x]^(2*(k-inversef[j]+1)+par),{j,2,2*Fibonacci[k-1]}]; Table[denomt[k,1],{k,1,7}]//TraditionalForm Table[Sum[Coefficient[Expand[denomt[k,1]],x,i]*Subscript[a,n-i],{i,0,Exponent[denomt[k,1],x]}],{k,1,7}]//TraditionalForm

Formula

Explicit formula (Artem M. Karavaev, after values computed by Andrey Khalyavin, Jun 19 2011):
n^2/6*(n^10/120-5*n^9/8+125*n^8/6-3275*n^7/8+316073*n^6/60-371219*n^5/8+282695*n^4-4676911*n^3/4+15512322*n^2/5-4626944*n+2452536
+(n^8/4-14*n^7+1411*n^6/4-5227*n^5+199399*n^4/4-313302*n^3+2530255*n^2/2-2984844*n+3117968)*Floor[n/2]
+(24*n^4-864*n^3+12852*n^2-95112*n+309128)*Floor[n/3]+(12*n^4-432*n^3+6180*n^2-42384*n+117584)*Floor[(n+1)/3]
+(27*n^4-1044*n^3+16044*n^2-118296*n+350388)*Floor[n/4]+(27*n^4-1044*n^3+16044*n^2-118296*n+360348)*Floor[(n+1)/4]
+(96*n^2-1920*n+22248)*Floor[n/5]+(48*n^2-960*n+10224)*Floor[(n+1)/5]+(48*n^2-960*n+12024)*Floor[(n+2)/5]+(48*n^2-960*n+10224)*Floor[(n+3)/5]
+(492*n^2-10344*n+73960)*Floor[(n+1)/6]
+1968*Floor[n/7]+984*Floor[(n+1)/7]+984*Floor[(n+2)/7]+984*Floor[(n+3)/7]+984*Floor[(n+4)/7]+984*Floor[(n+5)/7]
+9960*Floor[n/8]+9960*Floor[(n+3)/8]
+1800*Floor[(n+1)/10]-1800*Floor[(n+2)/10]+1800*Floor[(n+3)/10]).
Alternative formula (Vaclav Kotesovec, after values computed by Andrey Khalyavin, Jun 20 2011):
a(n) = n^2*(n^10/720-n^9/12+661*n^8/288-153*n^7/4+615887*n^6/1440-80581*n^5/24+1801697*n^4/96-295355*n^3/4+9389033*n^2/48-626899*n/2+142789469/630
+(n^8/96-7*n^7/12+1411*n^6/96-5227*n^5/24+199399*n^4/96-52217*n^3/4+843309*n^2/16-745349*n/6+2315441/18)*(-1)^n
+(9*n^4/4-87*n^3+1337*n^2-9858*n+29614)*Cos[Pi*n/2]
+2*(123*n^2-2586*n+18490)*Cos[Pi*n/3]/9+2*(6*n^4-216*n^3+3213*n^2-23778*n+77282)*Cos[2*Pi*n/3]/9
+415*(Cos[Pi*n/4]+Cos[3*Pi*n/4])
+8/5*Cos[Pi*n/5]*(75*Cos[2*Pi*n/5]+(927-80*n+4*n^2)*Cos[3*Pi*n/5])
+328/7*(Cos[2*Pi*n/7]+Cos[4*Pi*n/7]+Cos[6*Pi*n/7])).
Recurrence: a(n) = a(n-124) + 5a(n-123) + 19a(n-122) + 53a(n-121) + 126a(n-120) + 256a(n-119) + 460a(n-118) + 731a(n-117) + 1024a(n-116) + 1234a(n-115) + 1180a(n-114) + 631a(n-113) - 677a(n-112) - 2917a(n-111) - 6108a(n-110) - 9923a(n-109) - 13657a(n-108) - 16137a(n-107) - 15876a(n-106) - 11304a(n-105) - 1172a(n-104) + 14879a(n-103) + 35916a(n-102) + 59190a(n-101) + 80301a(n-100) + 93334a(n-99) + 92030a(n-98) + 70850a(n-97) + 26815a(n-96) - 39130a(n-95) - 120942a(n-94) - 207185a(n-93) - 282105a(n-92) - 327419a(n-91) - 326009a(n-90) - 265142a(n-89) - 140929a(n-88) + 39571a(n-87) + 256518a(n-86) + 479114a(n-85) + 668872a(n-84) + 785798a(n-83) + 795775a(n-82) + 677688a(n-81) + 430187a(n-80) + 74064a(n-79) - 347112a(n-78) - 773130a(n-77) - 1134433a(n-76) - 1364780a(n-75) - 1412189a(n-74) - 1250448a(n-73) - 885628a(n-72) - 357906a(n-71) + 262286a(n-70) + 885029a(n-69) + 1413752a(n-68) + 1762777a(n-67) + 1870496a(n-66) + 1712484a(n-65) + 1305033a(n-64) + 705009a(n-63) - 705009a(n-61) - 1305033a(n-60) - 1712484a(n-59) - 1870496a(n-58) - 1762777a(n-57) - 1413752a(n-56) - 885029a(n-55) - 262286a(n-54) + 357906a(n-53) + 885628a(n-52) + 1250448a(n-51) + 1412189a(n-50) + 1364780a(n-49) + 1134433a(n-48) + 773130a(n-47) + 347112a(n-46) - 74064a(n-45) - 430187a(n-44) - 677688a(n-43) - 795775a(n-42) - 785798a(n-41) - 668872a(n-40) - 479114a(n-39) - 256518a(n-38) - 39571a(n-37) + 140929a(n-36) + 265142a(n-35) + 326009a(n-34) + 327419a(n-33) + 282105a(n-32) + 207185a(n-31) + 120942a(n-30) + 39130a(n-29) - 26815a(n-28) - 70850a(n-27) - 92030a(n-26) - 93334a(n-25) - 80301a(n-24) - 59190a(n-23) - 35916a(n-22) - 14879a(n-21) + 1172a(n-20) + 11304a(n-19) + 15876a(n-18) + 16137a(n-17) + 13657a(n-16) + 9923a(n-15) + 6108a(n-14) + 2917a(n-13) + 677a(n-12) - 631a(n-11) - 1180a(n-10) - 1234a(n-9) - 1024a(n-8) - 731a(n-7) - 460a(n-6) - 256a(n-5) - 126a(n-4) - 53a(n-3) - 19a(n-2) - 5a(n-1).

A190399 Number of ways to place 4 nonattacking grasshoppers on a toroidal chessboard of size n x n.

Original entry on oeis.org

0, 1, 54, 1068, 8550, 45873, 177968, 562032, 1519560, 3662625, 8057390, 16477020, 31712850, 58018793, 101639700, 171525568, 280160068, 444636297, 687881890, 1040201500, 1541008350, 2240952065, 3204279960, 4511682288
Offset: 1

Views

Author

Vaclav Kotesovec, May 10 2011

Keywords

Comments

The Grasshopper moves on the same lines as a queen, but must jump over a hurdle to land on the square immediately beyond.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- x (80 x^14 - 444 x^13 + 768 x^12 + 108 x^11 - 1824 x^10 + 1600 x^9 + 1025 x^8 - 1200 x^7 + 708 x^6 + 1772 x^5 + 7254 x^4 + 2788 x^3 + 756 x^2 + 48 x + 1) / ((x - 1)^9 (x + 1)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 03 2013 *)

Formula

a(n) = 1/24*n^2*(n^6 -6*n^4 -96*n^3 +347*n^2 +96*n -726 +96*(-1)^n), n>4.
G.f.: -x^2*(80*x^14 -444*x^13 +768*x^12 +108*x^11 -1824*x^10 +1600*x^9 +1025*x^8 -1200*x^7 +708*x^6 +1772*x^5 +7254*x^4 +2788*x^3 +756*x^2 +48*x +1)/((x-1)^9*(x+1)^3).

A178974 Number of ways to place 4 nonattacking amazons (superqueens) on an n X n toroidal board.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 98, 3328, 17496, 99600, 316052, 1041408, 2501538, 6157536, 12531150, 25938944, 47168268, 86938272, 145818008, 247240000, 390084786, 620964256, 933865918, 1414946304, 2047225000, 2980849040, 4177648224, 5886858432, 8032809818, 11012886000, 14689386642, 19674427392, 25732782504, 33779841296, 43433208000, 56027023488, 70963952198, 90145026976, 112667956362, 141187744000
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 02 2011

Keywords

Comments

An amazon (superqueen) moves like a queen and a knight.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[2 x^6 (162 x^30 - 350 x^29 - 1488 x^28 - 718 x^27 + 2389 x^26 + 6635 x^25 + 6157 x^24 - 3372 x^23 - 15873 x^22 - 22215 x^21 - 8561 x^20 + 23622 x^19 + 55919 x^18 + 38469 x^17 - 91949 x^16 - 461696 x^15 - 1076702 x^14 - 1978832 x^13 - 2858196 x^12 - 3576618 x^11 - 3727323 x^10 - 3419559 x^9 - 2634463 x^8 - 1782420 x^7 - 988307 x^6 - 472291 x^5 - 171451 x^4 - 53262 x^3 - 10265 x^2 - 1713 x - 49) / ((x - 1)^9 (x + 1)^7 (x^2 + 1)^3 (x^2 + x + 1)^3), {x, 0, 40}], x] (* _Vincenzo Librandi Jun 01 2013 *)

Formula

a(n)= (1/4)*n^2*(n^6/6 -4*n^5 +197*n^4/6 -66*n^3 -1941*n^2/4 +2638*n -18907/6 +(n^4/2 -10*n^3 +289*n^2/4 -210*n +357/2)*(-1)^n +18*cos(Pi*n/2) +32/3*cos(4*Pi*n/3)), n>=10.
G.f.: 2*x^7*(162*x^30 -350*x^29 -1488*x^28 -718*x^27 +2389*x^26 +6635*x^25 +6157*x^24 -3372*x^23 -15873*x^22 -22215*x^21 -8561*x^20 +23622*x^19 +55919*x^18 +38469*x^17 -91949*x^16 -461696*x^15 -1076702*x^14 -1978832*x^13 -2858196*x^12 -3576618*x^11 -3727323*x^10 -3419559*x^9 -2634463*x^8 -1782420*x^7 -988307*x^6 -472291*x^5 -171451*x^4 -53262*x^3 -10265*x^2 -1713*x -49)/((x-1)^9*(x+1)^7*(x^2+1)^3*(x^2+x+1)^3).

A178720 Degree of denominator of GF for number of ways to place k nonattacking queens on an n X n toroidal board.

Original entry on oeis.org

3, 8, 12, 28, 58, 142, 350, 906, 2320, 6056, 15778, 41024, 107132, 280184, 732998, 1918354, 5019810, 13141378, 34398686, 90045424, 235729374, 617126438, 1615633560, 4229774958, 11073514332, 28990794770, 75898640094, 198704554772
Offset: 1

Views

Author

Vaclav Kotesovec, Jun 07 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Table[If[k > 1, 4*k + Sum[ Sum[(2*j + 1)*EulerPhi[i], {i, 2*Fibonacci[k - j - 1] + 1, 2*Fibonacci[k - j]}], {j, 1, k - 2}], 3], {k, 1, 20}]

Formula

Explicit formula (Vaclav Kotesovec, Jun 05 2010), for k>2 : t(k) = 4*k+Sum[Sum[(2*j+1)*EulerPhi[i],{i,2*Fibonacci[k-j-1]+1,2*Fibonacci[k-j]}],{j,1,k-2}], Asymptotic formula: t(k) ~ 12/(5*Pi^2)*((1+Sqrt[5])/2)^(2*k+1) or t(k) ~ 6*(1+Sqrt[5])/Pi^2*Fibonacci[k]^2
Showing 1-7 of 7 results.