Nonagonal Number

Author

Eric W. Weisstein
September 29, 2007

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/NonagonalNumber.nb.

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

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

Definition

NonagonalNumber[n]

Table[NonagonalNumber[n],{n,5}]

Figure

With[{n=9},
Show[GraphicsArray[Graphics[#,AspectRatio->Automatic,PlotRange->All]&/@Table[PolygonalDiagram[n,m,PointStyle->{PointSize[.06],Red}],{m,5}]]]
]

Representation as a Sum of Nonagonal Numbers

NotRepresentable[l_,n_]:=Complement[Range[0,Last[l]],Select[Union[Total/@Subsets[Flatten[Transpose[Table[l,{n}]]],{n}]],#≤Last[l]&]]

3

NotRepresentable[NonagonalNumber[Range[0,150]],3]//Timing

Length[Last[%]]

4

NotRepresentable[NonagonalNumber[Range[0,32]],4]//Timing

Length[Last[%]]

5

NotRepresentable[NonagonalNumber[Range[0,13]],5]//Timing

Length[Last[%]]

6

NotRepresentable[NonagonalNumber[Range[0,7]],6]//Timing

Length[Last[%]]

Generating Function

<<DiscreteMath`RSolve`

gf=FullSimplify[PowerSum[NonagonalNumber[n],{x,n}]]

Series[gf,{x,0,5}]