Knights Problem

Author

Eric W. Weisstein
October 3, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Games/KnightsProblem.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/KnightsProblem.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Maximum number

Formula

K[n_?EvenQ]:=n^2/2
K[n_?OddQ]:=(n^2+1)/2

Table[K[n],{n,10}]

Generating Function

GeneratingFunction[Piecewise[{{n^2/2,Mod[n,2]==0},{(n^2+1)/2,Mod[n,2]==1}}],n,x]

Sum[Piecewise[{{n^2/2,Mod[n,2]==0},{(n^2+1)/2,Mod[n,2]==1}}](x^n),{n,0,∞}]

Sum[Piecewise[{{n^2/2,Mod[n,2]==0},{(n^2+1)/2,Mod[n,2]==1}}](x^n),{n,0,10}]

Factor[Sum[(1/2)(((2n))^2)(x^(2n)),{n,0,∞}]+Sum[(1/2)((((2n-1))^2)+1)(x^(2n-1)),{n,∞}]]

Series[%,{x,0,10}]//Normal

SeriesCoefficient[-((x (1+(x^2)))/((((-1+x))^3) (1+x))),{x,0,n}]

FullSimplify[(1/4) (1-(((-1))^n)+2 (n^2)),n∈Integers&&n>0]

Refine[(1/4) (1-(((-1))^n)+2 (n^2)),Mod[n,2]==0]//Factor

Refine[(1/4) (1-(((-1))^n)+2 (n^2)),Mod[n,2]==1]//Factor

Display

pieces=StringJoin@Table["m m m m  m m m m",{4}];

Show[Graphics[ChessPieces[pieces,OutputFormat->"Display"],AspectRatio->Automatic,PlotRange->{{-4,4},{-4,4}}]]

Export as EPS

Show[Graphics[ChessPieces[pieces,OutputFormat->"EPS"],AspectRatio->Automatic,PlotRange->{{-4,4},{-4,4}}]]

Minumum number

pieces="             m   mm mm    m          m    mm mm   m";

Display

Show[Graphics[ChessPieces[pieces,OutputFormat->"Display"],AspectRatio->Automatic,PlotRange->{{-4,4},{-4,4}}]]

Export as EPS

Show[Graphics[ChessPieces[pieces,OutputFormat->"EPS"],AspectRatio->Automatic,PlotRange->{{-4,4},{-4,4}}]]