Kings Problem

Author

Eric W. Weisstein
October 3, 2008

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

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

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

Maximum number

Generating Function

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

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

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

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

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

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

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

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

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

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

Display

pieces=StringJoin@Table["        l l l l ",{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="l  l  l         "<>StringJoin@Table["        l  l  l         ",{2}];

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}}]]