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.

Previous Showing 11-18 of 18 results.

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

A172200 Number of ways to place 2 nonattacking amazons (superqueens) on an n X n board.

Original entry on oeis.org

0, 0, 0, 20, 92, 260, 580, 1120, 1960, 3192, 4920, 7260, 10340, 14300, 19292, 25480, 33040, 42160, 53040, 65892, 80940, 98420, 118580, 141680, 167992, 197800, 231400, 269100, 311220, 358092, 410060, 467480, 530720, 600160, 676192, 759220, 849660
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

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

References

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

Crossrefs

Programs

  • Magma
    [(n-1)*(n-2)*(n-3)*(3*n+8)/6: n in [1..50]]; // Vincenzo Librandi, May 27 2013
    
  • Mathematica
    CoefficientList[Series[4x^3(5-2x)/(1-x)^5, {x, 0, 40}], x] (* Vincenzo Librandi, May 27 2013 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,0,0,20,92},40] (* or *) Table[(n-1)(n-2)(n-3)(3n+8)/6,{n,40}] (* Harvey P. Dale, May 16 2021 *)
  • SageMath
    [binomial(n-1,3)*(3*n+8) for n in (1..50)] # G. C. Greubel, Apr 28 2022

Formula

Explicit formula (Christian Poisson, 1990): a(n) = (n - 1)(n - 2)(n - 3)(3n + 8)/6.
G.f.: 4*x^4*(5-2*x)/(1-x)^5. - Colin Barker, Jan 09 2013
E.g.f.: 8 + (1/6)*(-48 +48*x -24*x^2 +8*x^3 +3*x^4)*exp(x). - G. C. Greubel, Apr 28 2022

A178721 Number of ways to place 7 nonattacking queens on an n X n board.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 40, 3192, 119180, 2119176, 23636352, 186506000, 1131544008, 5613017128, 23670094984, 87463182432, 289367715488, 872345119896, 2427609997716, 6305272324272
Offset: 1

Views

Author

Vaclav Kotesovec, Jun 07 2010

Keywords

Crossrefs

Programs

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

Formula

Denominator of G.f.: (x-1)^15*(x+1)^10*(x^2+x+1)^8*(x^2+1)^6*(x^4+x^3+x^2+x+1)^6*(x^2-x+1)^4*(x^6+x^5+x^4+x^3+x^2+x+1)^4*(x^4+1)^4*(x^6+x^3+1)^2*(x^4-x^3+x^2-x+1)^2*(x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)^2*(x^4-x^2+1)^2*(x^12+x^11+x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)^2.
Recurrence: a(n) = a(n-197) + 11a(n-196) + 66a(n-195) + 284a(n-194) + 979a(n-193) + 2867a(n-192) + 7391a(n-191) + 17167a(n-190) + 36502a(n-189) + 71854a(n-188) + 132001a(n-187) + 227579a(n-186) + 369573a(n-185) + 566345a(n-184) + 818910a(n-183) + 1114468a(n-182) + 1418684a(n-181) + 1667858a(n-180) + 1762862a(n-179) + 1567406a(n-178) + 913631a(n-177) - 382005a(n-176) - 2490306a(n-175) - 5527702a(n-174) - 9503162a(n-173) - 14258598a(n-172) - 19411273a(n-171) - 24310113a(n-170) - 28020291a(n-169) - 29351159a(n-168) - 26940769a(n-167) - 19405263a(n-166) - 5553140a(n-165) + 15346812a(n-164) + 43268288a(n-163) + 77138720a(n-162) + 114608227a(n-161) + 151932369a(n-160) + 184024666a(n-159) + 204725598a(n-158) + 207315406a(n-157) + 185268748a(n-156) + 133212155a(n-155) + 48004017a(n-154) - 70183102a(n-153) - 216930246a(n-152) - 382960078a(n-151) - 554012366a(n-150) - 711346353a(n-149) - 832955143a(n-148) - 895498622a(n-147) - 876864666a(n-146) - 759163548a(n-145) - 531860790a(n-144) - 194674273a(n-143) + 240182841a(n-142) + 746828188a(n-141) + 1285960424a(n-140) + 1806771216a(n-139) + 2250587298a(n-138) + 2556103772a(n-137) + 2665846492a(n-136) + 2533288725a(n-135) + 2129874995a(n-134) + 1451101463a(n-133) + 520790749a(n-132) - 607206046a(n-131) - 1850443990a(n-130) - 3102719461a(n-129) - 4242198625a(n-128) - 5142328327a(n-127) - 5684628585a(n-126) - 5772140029a(n-125) - 5342085203a(n-124) - 4376237801a(n-123) - 2907601789a(n-122) - 1022286568a(n-121) + 1144093134a(n-120) + 3415602536a(n-119) + 5590244180a(n-118) + 7458159648a(n-117) + 8822115392a(n-116) + 9518231826a(n-115) + 9434741790a(n-114) + 8526633540a(n-113) + 6824351658a(n-112) + 4435274433a(n-111) + 1537407289a(n-110) - 1634445881a(n-109) - 4808938651a(n-108) - 7703022656a(n- 107) - 10048957558a(n-106) - 11620750186a(n-105) - 12257251526a(n-104) - 11879415820a(n-103) - 10499785534a(n-102) - 8223052813a(n-101) - 5237477687a(n-100) - 1797913038a(n-99) + 1797913038a(n-98) + 5237477687a(n-97) + 8223052813a(n-96) + 10499785534a(n-95) + 11879415820a(n-94) + 12257251526a(n-93) + 11620750186a(n-92) + 10048957558a(n-91) + 7703022656a(n-90) + 4808938651a(n-89) + 1634445881a(n-88) - 1537407289a(n-87) - 4435274433a(n-86) - 6824351658a(n-85) - 8526633540a(n-84) - 9434741790a(n-83) - 9518231826a(n-82) - 8822115392a(n-81) - 7458159648a(n-80) - 5590244180a(n-79) - 3415602536a(n-78) - 1144093134a(n-77) + 1022286568a(n-76) + 2907601789a(n-75) + 4376237801a(n-74) + 5342085203a(n-73) + 5772140029a(n-72) + 5684628585a(n-71) + 5142328327a(n-70) + 4242198625a(n-69) + 3102719461a(n-68) + 1850443990a(n-67) + 607206046a(n-66) - 520790749a(n-65) - 1451101463a(n-64) - 2129874995a(n-63) - 2533288725a(n-62) - 2665846492a(n-61) - 2556103772a(n-60) - 2250587298a(n-59) - 1806771216a(n-58) - 1285960424a(n-57) - 746828188a(n-56) - 240182841a(n-55) + 194674273a(n-54) + 531860790a(n-53) + 759163548a(n-52) + 876864666a(n-51) + 895498622a(n-50) + 832955143a(n-49) + 711346353a(n-48) + 554012366a(n-47) + 382960078a(n-46) + 216930246a(n-45) + 70183102a(n-44) - 48004017a(n-43) - 133212155a(n-42) - 185268748a(n-41) - 207315406a(n-40) - 204725598a(n-39) - 184024666a(n-38) - 151932369a(n-37) - 114608227a(n-36) - 77138720a(n-35) - 43268288a(n-34) - 15346812a(n-33) + 5553140a(n-32) + 19405263a(n-31) + 26940769a(n-30) + 29351159a(n-29) + 28020291a(n-28) + 24310113a(n-27) + 19411273a(n-26) + 14258598a(n-25) + 9503162a(n-24) + 5527702a(n-23) + 2490306a(n-22) + 382005a(n-21) - 913631a(n-20) - 1567406a(n-19) - 1762862a(n-18) - 1667858a(n-17) - 1418684a(n-16) - 1114468a(n-15) - 818910a(n-14) - 566345a(n-13) - 369573a(n-12) - 227579a(n-11) - 132001a(n-10) - 71854a(n-9) - 36502a(n-8) - 17167a(n-7) - 7391a(n-6) - 2867a(n-5) - 979a(n-4) - 284a(n-3) - 66a(n-2) - 11a(n-1).

Extensions

a(19)-a(20) from Vaclav Kotesovec, Jun 16 2010

A174642 Number of ways to place 4 nonattacking amazons (superqueens) on a 4 X n board.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 12, 60, 180, 432, 900, 1692, 2940, 4800, 7452, 11100, 15972, 22320, 30420, 40572, 53100, 68352, 86700, 108540, 134292, 164400, 199332, 239580, 285660, 338112, 397500, 464412, 539460, 623280, 716532, 819900, 934092, 1059840
Offset: 1

Views

Author

Vaclav Kotesovec, Mar 25 2010

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- 12 x^7 (x^3 + 1) / (x - 1)^5, {x, 0, 50}], x] (* Vincenzo Librandi, May 30 2013 *)

Formula

G.f.: -12*x^8*(x^3+1)/(x-1)^5.
Explicit formula: a(n) = (n-7)(n^3-21n^2+158n-420), n>=7.

Extensions

More terms from Vincenzo Librandi, May 30 2013

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

Original entry on oeis.org

3, 5, 9, 17, 37, 81, 197, 477, 1197, 3077, 7989, 20649, 53885, 140601, 366917, 959685, 2511477, 6571681, 17202449, 45027677, 117871345, 308581637, 807852685, 2114904397, 5536838045, 14495554593, 37949503089, 99352690141, 260108204933
Offset: 1

Views

Author

Vaclav Kotesovec, Jun 07 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Table[2*k + 1 + Sum[Sum[2*j*EulerPhi[i], {i, Fibonacci[k - j] + 1, Fibonacci[k - j + 1]}], {j, 1, k - 1}], {k, 1, 20}]

Formula

Explicit formula (Vaclav Kotesovec, May 31 2010), for k>1 : d(k) = 2*k+1+Sum[Sum[2*j*EulerPhi[i],{i,Fibonacci[k-j]+1,Fibonacci[k-j+1]}],{j,1,k-1}].
Asymptotic formula: d(k) ~ 6/(5*Pi^2)*((1+Sqrt[5])/2)^(2*k+1) or d(k) ~ 3*(1+Sqrt[5])/Pi^2*Fibonacci[k]^2.

A252593 Number of ways to place 8 nonattacking queens on an n X n board.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 92, 13848, 636524, 14803480, 207667564, 2008758532, 14752426528, 87154016752, 432539436508, 1858901487620
Offset: 1

Views

Author

Antal Pinter, Dec 18 2014

Keywords

Comments

Conjectured recurrence order is 477 (see "Non-attacking chess pieces", p. 19). - Vaclav Kotesovec, Dec 19 2014

Crossrefs

Formula

a(n) = n^16/40320 - n^15/432 + 221*n^14/2160 + O(n^13). - Vaclav Kotesovec, Dec 19 2014

Extensions

a(16) from Vaclav Kotesovec, Dec 19 2014
a(17) from Vaclav Kotesovec, Dec 20 2014

A269133 Number of ways to place m nonattacking queens on an m X n board, 1 <= m <= n (triangular array).

Original entry on oeis.org

1, 2, 0, 3, 2, 0, 4, 6, 4, 2, 5, 12, 14, 12, 10, 6, 20, 36, 46, 40, 4, 7, 30, 76, 140, 164, 94, 40, 8, 42, 140, 344, 568, 550, 312, 92, 9, 56, 234, 732, 1614, 2292, 2038, 1066, 352, 10, 72, 364, 1400, 3916, 7552, 9632, 7828, 4040, 724, 11, 90, 536, 2468, 8492, 21362, 37248, 44148, 34774, 15116, 2680, 12, 110, 756, 4080, 16852, 52856, 120104, 195270, 222720, 160964, 68264, 14200
Offset: 1

Views

Author

Marko Riedel, Feb 19 2016

Keywords

Examples

			The triangular array begins:
   n\m  1   2   3    4     5     6      7      8      9     10    11    12
   1    1
   2    2   0
   3    3   2   0
   4    4   6   4    2
   5    5  12  14   12    10
   6    6  20  36   46    40     4
   7    7  30  76  140   164    94     40
   8    8  42 140  344   568   550    312     92
   9    9  56 234  732  1614  2292   2038   1066    352
  10   10  72 364 1400  3916  7552   9632   7828   4040    724
  11   11  90 536 2468  8492 21362  37248  44148  34774  15116  2680
  12   12 110 756 4080 16852 52856 120104 195270 222720 160964 68264 14200
...
		

Crossrefs

Cf. A000027 (m=1), A002378 (m=2), A061989 (m=3), A061990 (m=4), A061991 (m=5), A061992 (m=6), A061993 (m=7), A172449 (m=8).
Cf. A036464 (2Q), A047659 (3Q), A061994 (4Q), A108792 (5Q), A176186 (6Q).
Cf. A006717, A051906, A319284 (backtrack trees).

Programs

  • PARI
    {A269133(m, n, B=[], t=if(#B, setminus(n, Set(concat(B+t=[-#B..-1], B-t))), n=[1..n]))= if(#B < m-1, vecsum([A269133(m, setminus(n, [t]), concat(B,t)) | t<-t]), #t)} \\ M. F. Hasler, Jan 11 2022

A344227 Sprague-Grundy value for the Node-Kayles game played on the n-queens graph.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 2, 3, 1, 0, 1, 0, 1
Offset: 0

Views

Author

Max Fan and Matthew K. Bardoe, May 13 2021

Keywords

Comments

This game is also known as the Non-Attacking Queens game. Rules: two players successively place queens on an n X n chessboard such that the queens do not attack each other. The last player to place a queen wins.
Empirically, it appears that after the 9th term, the sequence oscillates between 1 and 0.
The n-queens graph considered here is not vertex-transitive. However, the toroidal version is and for Node-Kayles played on graphs that are vertex-transitive, it can be proven that the Sprague-Grundy value must be either 0 or 1.
Proof:
Each node in a graph that is transitive for all vertices has the same Sprague-Grundy value, since removing any node and its neighbors will produce identical graphs up to isomorphism.
This Sprague-Grundy value of the new graph must be either zero or nonzero.
If zero, then by the minimum exclusion principle, the value of the original graph is 1.
If nonzero, then by the minimum exclusion principle, the value of the original graph is 0.
Therefore, the Sprague-Grundy value of the original, vertex-transitive graph must be either 0 or 1.

References

  • G. Schrage, The eight queens problem as a strategy game, Int. J. Math. Educ. Sci. Technol. 17 (1989) 143-148. (mentions a restricted form of the Non-Attacking Queens game).

Crossrefs

Programs

  • Haskell
    pickCoords n = sequence (replicate 2 [0..n-1])
    mex list = head (filter (`notElem` list) [0..(maximum list+1)])
    checkIntersect [x,y] [n,m] = not (x == n || y == m) && (abs (x-n) /= abs (y-m))
    nextMoves max history = filter (\move -> null history || all (checkIntersect move) history) (pickCoords max)
    calcNimber max history | null (nextMoves max history) = 0 | otherwise = mex (map (\move -> calcNimber max (history ++ [move])) (nextMoves max history))
    a344227 n = calcNimber n []
  • Rust
    // See Fan link.
    
Previous Showing 11-18 of 18 results.