Hex Number

Author

Eric W. Weisstein
October 24, 2003

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

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

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

Graphic

Show[Graphics[CenteredPolygonalDiagram[6,3]],
AspectRatio->Automatic,PlotRange->All,ImageSize->200]

Definition

Expand[{HexNumber[n],1+6TriangularNumber[n]}]

Table[HexNumber[n],{n,0,5}]

Sum

Simplify[Sum[HexNumber[k],{k,0,n}]]

Recurrence

Table[2H[n-1]-H[n-2]+6,{n,5}]

RSolve[H[n]==2H[n-1]-H[n-2]+6,H[n],n]

Generating Function

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

Multifigurate

Hex triangular

TriangularNumber[m]==HexNumber[n]

Reduce[HexNumber[m]==TriangularNumber[n]&&m>0&&n>0,{m,n},Integers]

ht=Table[{(1/24) (-12-3 (2 (((5-2 (Sqrt[6])))^(C[1]))+(Sqrt[6]) (((5-2 (Sqrt[6])))^(C[1]))+2 (((5+2 (Sqrt[6])))^(C[1]))-(Sqrt[6]) (((5+2 (Sqrt[6])))^(C[1])))),(1/2) (-1+(1/2) (3 (((5-2 (Sqrt[6])))^(C[1]))+(Sqrt[6]) (((5-2 (Sqrt[6])))^(C[1]))+3 (((5+2 (Sqrt[6])))^(C[1]))-(Sqrt[6]) (((5+2 (Sqrt[6])))^(C[1]))))}/.C[1]->c,{c,10}]//Expand

Transpose[ht]

HexNumber/@First/@ht

Hex Square

SquareNumber[m]==HexNumber[n]

Reduce[SquareNumber[m]==HexNumber[n]&&m>0&&n>0,{m,n},Integers]

hs=Table[{(1/4) (2 (((7-4 (Sqrt[3])))^(C[1]))+(Sqrt[3]) (((7-4 (Sqrt[3])))^(C[1]))+2 (((7+4 (Sqrt[3])))^(C[1]))-(Sqrt[3]) (((7+4 (Sqrt[3])))^(C[1]))),(1/6) (-3+(1/2) (-3 (((7-4 (Sqrt[3])))^(C[1]))-2 (Sqrt[3]) (((7-4 (Sqrt[3])))^(C[1]))-3 (((7+4 (Sqrt[3])))^(C[1]))+2 (Sqrt[3]) (((7+4 (Sqrt[3])))^(C[1]))))}/.C[1]->c,{c,10}]//Expand

Transpose[hs]

{SquareNumber/@First/@hs,HexNumber/@Last/@hs}

Hex Cubic

CubicNumber[m]==HexNumber[n]

Reduce[CubicNumber[m]==HexNumber[n]&&m>0&&n>0,{m,n},Integers]