Octagonal Number

Author

Eric W. Weisstein
September 29, 2007

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

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

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

Definition

OctagonalNumber[n]

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

Figure

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

Representation as a Sum of Octagonal Numbers

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

3

NotRepresentable[OctagonalNumber[Range[0,20]],3]//Timing

Length[Last[%]]

4

NotRepresentable[OctagonalNumber[Range[0,30]],4]//Timing

Length[Last[%]]

5

NotRepresentable[OctagonalNumber[Range[0,16]],5]//Timing

Length[Last[%]]

6

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

Length[Last[%]]

Generating Function

<<DiscreteMath`RSolve`

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

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

Series[x(5x+1)/(1-x)^3,{x,0,5}]

CoefficientList[%,x]