login
A196812
Number of ways to place 2 nonattacking nightriders on an n X n toroidal board
1
0, 2, 18, 72, 200, 378, 588, 1312, 2106, 3650, 4840, 7848, 10140, 14210, 20250, 25728, 32368, 42282, 51984, 67400, 80262, 97042, 116380, 141984, 167500, 195026, 228906, 266952, 306124, 358650, 403620, 463360, 524898, 592450, 671300, 754920, 837828, 936434
OFFSET
1,2
COMMENTS
A nightrider is a fairy chess piece that can move (proportionate to how a knight moves) in any direction.
LINKS
FORMULA
G.f. (Vaclav Kotesovec, Apr 18 2010): -(2*x^2*(2*x^29 + 25*x^28 + 151*x^27 + 620*x^26 + 1965*x^25 + 5094*x^24 + 11169*x^23 + 21370*x^22 + 36349*x^21 + 56009*x^20 + 78898*x^19 + 102778*x^18 + 124128*x^17 + 139254*x^16 + 144792*x^15 + 139276*x^14 + 123618*x^13 + 101232*x^12 + 76538*x^11 + 53680*x^10 + 35008*x^9 + 21359*x^8 + 12037*x^7 + 6226*x^6 + 2853*x^5 + 1122*x^4 + 351*x^3 + 82*x^2 + 13*x + 1))/((x-1)^5*(x+1)^3*(x^2+1)^3*(x^2+x+1)^3*(x^4+x^3+x^2+x+1)^3)
Recurrence: a(n) = a(n-32) + 4*a(n-31) + 10*a(n-30) + 17*a(n-29) + 20*a(n-28) + 11*a(n-27) - 15*a(n-26) - 54*a(n-25) - 90*a(n-24) - 99*a(n-23) - 63*a(n-22) + 18*a(n-21) + 116*a(n-20) + 188*a(n-19) + 194*a(n-18) + 123*a(n-17) - 123*a(n-15) - 194*a(n-14) - 188*a(n-13) - 116*a(n-12) - 18*a(n-11) + 63*a(n-10) + 99*a(n-9) + 90*a(n-8) + 54*a(n-7) + 15*a(n-6) - 11*a(n-5) - 20*a(n-4) - 17*a(n-3) - 10*a(n-2) - 4*a(n-1)
Explicit formula: a(n) = n^2/2*(119/15+2*(-1)^n-4*n+n^2+2*cos((n*Pi)/2) +16/5*cos((4*n*Pi)/5)+8/3*cos((4*n*Pi)/3)+16/5*cos((8*n*Pi)/5))
MATHEMATICA
Table[n^2/2*(21-22*n+n^2+16*Floor[n/5]+4*Floor[n/4]+8*Floor[n/3]+8*Floor[n/2]+8*Floor[(1+n)/5]+4*Floor[(1+n)/4]+4*Floor[(1+n)/3]+8*Floor[(2+n)/5]+8*Floor[(3+n)/5]), {n, 1, 100}]
CROSSREFS
Sequence in context: A034959 A316902 A316904 * A163102 A073976 A120361
KEYWORD
nonn
AUTHOR
Vaclav Kotesovec, Oct 06 2011
STATUS
approved