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-20 of 22 results. Next

A172202 Number of ways to place 3 nonattacking kings on a 3 X n board.

Original entry on oeis.org

0, 0, 8, 34, 105, 248, 490, 858, 1379, 2080, 2988, 4130, 5533, 7224, 9230, 11578, 14295, 17408, 20944, 24930, 29393, 34360, 39858, 45914, 52555, 59808, 67700, 76258, 85509, 95480, 106198, 117690, 129983, 143104, 157080, 171938, 187705
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [(n-2)*(9*n^2-45*n+70)/2: n in [2..50]]; // G. C. Greubel, Apr 29 2022
    
  • Mathematica
    CoefficientList[Series[x^2*(8+2*x+17*x^2)/(1-x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, May 27 2013 *)
    LinearRecurrence[{4,-6,4,-1},{0,0,8,34,105},40] (* Harvey P. Dale, Oct 07 2023 *)
  • SageMath
    [(1/8)*(n-2)*(9*(2*n-5)^2+55) +17*bool(n==1) for n in (1..50)] # G. C. Greubel, Apr 29 2022

Formula

a(n) = (n-2)*(9*n^2 - 45*n + 70)/2, n>=2.
G.f.: x^3*(8+2*x+17*x^2)/(1-x)^4. - Vaclav Kotesovec, Mar 24 2010
E.g.f.: 70 + 17*x + (1/2)*(-140 + 106*x - 36*x^2 + 9*x^3)*exp(x). - G. C. Greubel, Apr 29 2022

Extensions

More terms from Vincenzo Librandi, May 27 2013

A172212 Number of ways to place 3 nonattacking knights on a 3 X n board.

Original entry on oeis.org

1, 12, 36, 100, 233, 456, 796, 1280, 1935, 2788, 3866, 5196, 6805, 8720, 10968, 13576, 16571, 19980, 23830, 28148, 32961, 38296, 44180, 50640, 57703, 65396, 73746, 82780, 92525, 103008, 114256, 126296, 139155, 152860, 167438, 182916, 199321
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(6 x^6 - 8 x^5 + 2 x^4 + 24 x^3 - 6 x^2 + 8 x + 1) / (x - 1)^4, {x, 0, 50}], x] (* Vincenzo Librandi, May 27 2013 *)

Formula

a(n) = (9n^3 - 45n^2 + 122n - 144)/2, n>=4.
G.f.: x*(6*x^6-8*x^5+2*x^4+24*x^3-6*x^2+8*x+1)/(x-1)^4. - Vaclav Kotesovec, Mar 25 2010

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

A173429 Number of ways to place 3 nonattacking nightriders on an n X n board.

Original entry on oeis.org

0, 4, 36, 276, 1152, 3920, 10568, 25348, 53848, 106292, 194732, 339416, 562652, 899796, 1388008, 2083908, 3044992, 4356344, 6102144, 8404204, 11380564, 15199100, 20019856, 26067112, 33551812, 42766092, 53981600, 67570804
Offset: 1

Views

Author

Vaclav Kotesovec, Feb 18 2010

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-(36 x^29 + 124 x^28 + 496 x^27 + 1128 x^26 + 2632 x^25 + 4280 x^24 + 7160 x^23 + 9296 x^22 + 12936 x^21 + 14828 x^20 + 18828 x^19 + 20164 x^18 + 23820 x^17 + 23684 x^16 + 25460 x^15 + 22972 x^14 + 22412 x^13 + 18532 x^12 + 16820 x^11 + 12996 x^10 + 10912 x^9 + 7552 x^8 + 5428 x^7 + 3012 x^6 + 1652 x^5 + 604 x^4 + 204 x^3 + 28 x^2 + 4 x) / ((x + 1)^4 (x - 1)^7 (x^2 + 1) (x^2 + x + 1) (x^8 + x^6 + x^4 + x^2 + 1)^2), {x, 0, 50}], x] (* Vincenzo Librandi, May 30 2013 *)
    LinearRecurrence[{2,0,-1,0,-2,2,0,1,0,0,-3,0,2,0,4,-4,0,-2,0,3,0,0,-1,0,-2,2,0,1,0,-2,1},{0,4,36,276,1152,3920,10568,25348,53848,106292,194732,339416,562652,899796,1388008,2083908,3044992,4356344,6102144,8404204,11380564,15199100,20019856,26067112,33551812,42766092,53981600,67570804,83876732,103365728,126463668},30] (* Harvey P. Dale, Dec 27 2015 *)

Formula

a(n) = 1/6*n^6-5/6*n^5+4031/1440*n^4-621/100*n^3+3313/288*n^2-2623/150*n+82321/43200 + (1/4*n^3-25/32*n^2+77/50*n-43/64)*(-1)^n - (1+(-1)^n)/8*cos(Pi*n/2) + 8/27*(-1)^n*cos(Pi*n/3) + (-4*(-1)^n+(sqrt(5)+3+(1-sqrt(5)/5)*(-1)^n)*n)*4/25*cos(Pi*n/5) + (sqrt(58*sqrt(5)+130)-sqrt(50-22*sqrt(5))*(-1)^n/5)*16/25*sin(Pi*n/5) + (-4+(sqrt(5)/5+1+(3-sqrt(5))*(-1)^n)*n)*4/25*cos(2*Pi*n/5) + (sqrt(22*sqrt(5)+50)/5-sqrt(130-58*sqrt(5))*(-1)^n)*16/25*sin(2*Pi*n/5).
Recurrence: a(n) = 2*a(n-1)-a(n-3)-2*a(n-5)+2*a(n-6)+a(n-8)-3*a(n-11)+2*a(n-13)+4*a(n-15)-4*a(n-16)-2*a(n-18)+3*a(n-20)-a(n-23)-2*a(n-25)+2*a(n-26)+a(n-28)-2*a(n-30)+a(n-31), n>=32.
G.f.: -(36*x^30+124*x^29+496*x^28+1128*x^27+2632*x^26+4280*x^25+7160*x^24+9296*x^23+12936*x^22+14828*x^21+18828*x^20+20164*x^19+23820*x^18+23684*x^17+25460*x^16+22972*x^15+22412*x^14+18532*x^13+16820*x^12+12996*x^11+10912*x^10+7552*x^9+5428*x^8+3012*x^7+1652*x^6+604*x^5+204*x^4+28*x^3+4*x^2)/((x+1)^4*(x-1)^7*(x^2+1)*(x^2+x+1)*(x^8+x^6+x^4+x^2+1)^2). - Vaclav Kotesovec, Mar 22 2010

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

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

Original entry on oeis.org

0, 0, 0, 0, 48, 424, 1976, 6616, 17852, 41544, 86660, 166288, 298616, 508200, 827168, 1296744, 1968676, 2907016, 4189772, 5910944, 8182400, 11136168, 14926536, 19732600, 25760588, 33246664, 42459476, 53703216, 67320392, 83695144
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

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

References

  • Panos Louridas, idee & form 93/2007, pp. 2936-2938.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); [0,0,0,0] cat Coefficients(R!( 4*x^5*(12+46*x+60*x^2+32*x^3-23*x^4-13*x^5+7*x^6-x^7)/((1+x)^2*(1-x)^7 ))); // G. C. Greubel, Apr 29 2022
    
  • Mathematica
    CoefficientList[Series[4*x^5*(12+46*x+60*x^2+32*x^3-23*x^4-13*x^5+7*x^6-x^7)/((1+x)^2*(1-x)^7), {x, 0, 40}], x] (* Vincenzo Librandi, May 27 2013 *)
  • SageMath
    [(1/24)*(4*n^6 -40*n^5 +62*n^4 +628*n^3 -2904*n^2 +4074*n -1341 +3*(-1)^n*(2*n-1)) -4*(5*bool(n==1) +2*bool(n==2) -bool(n==3)) for n in (1..40)] # G. C. Greubel, Apr 29 2022

Formula

Explicit formula (Panos Louridas, 2007): a(n) = (2*n^6 - 20*n^5 + 31*n^4 + 314*n^3 - 1452*n^2 + 2040*n - 672)/12 if n is even (n >= 4) and a(n) = (2*n^6 - 20*n^5 + 31*n^4 + 314*n^3 - 1452*n^2 + 2034*n - 669)/12 if n is odd (n >= 5).
G.f.: 4*x^5*(12+46*x+60*x^2+32*x^3-23*x^4-13*x^5+7*x^6-x^7)/((1+x)^2*(1-x)^7). - Vaclav Kotesovec, Mar 24 2010
a(n) = (1/24)*(4*n^6 - 40*n^5 + 62*n^4 + 628*n^3 - 2904*n^2 + 4074*n - 1341 + 3*(-1)^n*(2*n-1)) - 20*[n=1] - 8*[n=2] + 4*[n=3]. - G. C. Greubel, Apr 29 2022

A190395 Number of ways to place 3 nonattacking grasshoppers on a chessboard of size n x n.

Original entry on oeis.org

0, 4, 76, 516, 2172, 6860, 17904, 40796, 83976, 159732, 285220, 483604, 785316, 1229436, 1865192, 2753580, 3969104, 5601636, 7758396, 10566052, 14172940, 18751404, 24500256, 31647356, 40452312, 51209300, 64250004, 79946676
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.

References

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

Crossrefs

Cf. A047659.

Programs

  • Mathematica
    CoefficientList[Series[-4 x (3 x^5 - 7 x^4 + 4 x^3 + 17 x^2 + 12 x + 1) / (x - 1)^7, {x, 0, 50}], x] (* Vincenzo Librandi, Jun 02 2013 *)

Formula

Explicit formula (C. Poisson, 1990): a(n) = 1/6*(n-1)(n^5 +n^4 -2*n^3 -22*n^2 +76*n -72).
G.f.: -4*x^2*(3*x^5 -7*x^4 +4*x^3 +17*x^2 +12*x +1)/(x-1)^7.

A202654 Number of ways to place 3 nonattacking semi-queens on an n X n board.

Original entry on oeis.org

0, 0, 3, 52, 370, 1620, 5285, 14168, 33012, 69240, 133815, 242220, 415558, 681772, 1076985, 1646960, 2448680, 3552048, 5041707, 7018980, 9603930, 12937540, 17184013, 22533192, 29203100, 37442600, 47534175, 59796828, 74589102, 92312220, 113413345, 138388960
Offset: 1

Views

Author

Vaclav Kotesovec, Dec 22 2011

Keywords

Comments

Two semi-queens do not attack each other if they are in the same northwest-southeast diagonal.

Crossrefs

Programs

  • Mathematica
    Rest@ CoefficientList[Series[-x^3*(17 x^3 + 69 x^2 + 31 x + 3)/(x - 1)^7, {x, 0, 32}], x] (* Michael De Vlieger, Aug 19 2019 *)

Formula

a(n) = 1/6*(n-2)*(n-1)*n*(n^3-5*n^2+8*n-3).
G.f.: -x^3*(17*x^3 + 69*x^2 + 31*x + 3)/(x-1)^7.

A172207 Number of ways to place 3 nonattacking bishops on a 3 X n board.

Original entry on oeis.org

1, 6, 26, 86, 211, 426, 758, 1234, 1881, 2726, 3796, 5118, 6719, 8626, 10866, 13466, 16453, 19854, 23696, 28006, 32811, 38138, 44014, 50466, 57521, 65206, 73548, 82574, 92311, 102786, 114026, 126058, 138909, 152606, 167176, 182646, 199043, 216394, 234726, 254066
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(2 x^6 + 14 x^3 + 8 x^2 + 2 x + 1) / (x - 1)^4, {x, 0, 50}], x] (* Vincenzo Librandi, May 27 2013 *)

Formula

a(n) = (9n^3 - 45n^2 + 106n - 108)/2, n>=4.
G.f.: x*(2*x^6+14*x^3+8*x^2+2*x+1)/(x-1)^4. - Vaclav Kotesovec, Mar 25 2010

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.
Previous Showing 11-20 of 22 results. Next