Heptagonal Number

Author

Eric W. Weisstein
September 29, 2007

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

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

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

Definition

HeptagonalNumber[n]

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

Figure

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

Representation as a Sum of Heptagonal Numbers

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

3

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

Length[Last[%]]

4

NotRepresentable[HeptagonalNumber[Range[0,35]],4]//Timing

Length[Last[%5]]

5

NotRepresentable[HeptagonalNumber[Range[0,15]],5]//Timing

Length[Last[%4]]

6

NotRepresentable[HeptagonalNumber[Range[0,6]],6]//Timing

Length[Last[%]]

Generating Function

<<DiscreteMath`RSolve`

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

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