Barbell Graph

Author

Eric W. Weisstein
September 11, 2017

This notebook downloaded from http://mathworld.wolfram.com/notebooks/GraphTheory/BarbellGraph.nb.

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

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

Figures

Graphs.m

GraphicsGrid[Partition[Table[Show[BarbellGraph[n,VertexSize->{"Scaled",.05},System`VertexStyle->Red,System`EdgeStyle->Black],PlotLabel->Style[HoldForm[n]==n,FontFamily->"Times"]],{n,3,8}],UpTo[3]],Dividers->All,ImageSize->500,Spacings->{-50,20}]

Special Cases

Sort[{"Barbell"/.GraphData[#,"NotationRules"],GraphData[#,"Name"]}&/@DeleteCases[GraphData["Barbell"],{"Barbell",_}]]

Properties

Acyclic

seq=Table[GraphData[{"Barbell",n},"Acyclic"],{n,3,20}]

AdjacencyMatrixCount

seq=Table[GraphData[{"Barbell",n},"AdjacencyMatrixCount"],{n,3,20}]

FullSimplify[(((2n)!)/(2Gamma[n]^2))]

Table[(((2n)!)/(2Gamma[n]^2)),{n,3,20}]

Arboricity

seq=Table[GraphData[{"Barbell",n},"Arboricity"],{n,3,20}]

Table[Ceiling[n/2],{n,3,20}]

ArcTransitive

seq=Table[GraphData[{"Barbell",n},"ArcTransitive"],{n,3,20}]

ArcTransitcivity

seq=Table[GraphData[{"Barbell",n},"ArcTransitivity"],{n,3,20}]

AutomorphismCount

seq=DeleteCases[GraphData[{"Barbell",#},"AutomorphismCount"]&/@Range[3,20],_Missing]

FindSequenceFunction[seq,n-2]//FunctionExpand

BalabanIndex

seq=Table[GraphData[{"Barbell",n},"BalabanIndex"],{n,3,6}]//FullSimplify

Bandwidth

seq=Table[GraphData[{"Barbell",n},"Bandwidth"],{n,3,20}]

BridgeCount

seq=Table[GraphData[{"Barbell",n},"BridgeCount"],{n,3,20}]

BurningNumber

seq=Table[GraphData[{"Barbell",n},"BurningNumber"],{n,3,20}]

CharacteristicPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"CharacteristicPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Chordal

seq=Table[GraphData[{"Barbell",n},"Chordal"],{n,3,20}]

ChordCount

seq=Table[GraphData[{"Barbell",n},"ChordCount"],{n,3,20}]

seq=Table[Piecewise[{{0,n==3}},2Binomial[n,2]],{n,3,20}]

FindLinearRecurrence[seq]

FindSequenceFunction[Rest@seq,n-3]//Factor

Chordless

seq=Table[GraphData[{"Barbell",n},"Chordless"],{n,3,20}]

ChordlessCycleCount

seq=Table[GraphData[{"Barbell",n},"ChordlessCycleCount"],{n,3,20}]

Chords

seq=Table[GraphData[{"Barbell",n},"Chords"],{n,3,20}]

ChromaticallyUnique

seq=Table[GraphData[{"Barbell",n},"ChromaticallyUnique"],{n,20}]

GraphData[{"ChromaticallyUnique","Barbell"}]

ChromaticInvariant

seq=Table[GraphData[{"Barbell",n},"ChromaticInvariant"],{n,3,20}]

ChromaticNumber

seq=Table[GraphData[{"Barbell",n},"ChromaticNumber"],{n,3,20}]

ChromaticPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"ChromaticPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

poly2=Table[((FactorialPower[x,n])^2)(x-1)/x,{n,k0,kmax}];

FullSimplify[poly2-poly]

Circumference

seq=Table[GraphData[{"Barbell",n},"Circumference"],{n,3,20}]

Classes

Intersection@@(GraphData[#,"Classes"]&/@GraphData["Barbell"])

CliqueCount

seq=Table[GraphData[{"Barbell",n},"CliqueCount"],{n,3,20}]

FindSequenceFunction[seq,n-2]

CliqueCoveringNumber

seq=Table[GraphData[{"Barbell",n},"CliqueCoveringNumber"],{n,3,20}]

CliqueNumber

seq=Table[GraphData[{"Barbell",n},"CliqueNumber"],{n,3,20}]

CliquePolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"CliquePolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

CochromaticGraphNames

Table[GraphData[{"Barbell",n},"CochromaticGraphNames"],{n,3,20}]//Column

Select[GraphData["Barbell"],GraphData[#,"ChromaticallyUnique"]=!=False&]

ComplementOddChordlessCycleCount

seq=Table[GraphData[{"Barbell",n},"ComplementOddChordlessCycleCount"],{n,3,20}]

ConnectedComponentCount

seq=Table[GraphData[{"Barbell",n},"ConnectedComponentCount"],{n,3,20}]

ConnectedDominatingSetCount

A000302

seq=Table[GraphData[{"Barbell",n},"ConnectedDominatingSetCount"],{n,3,20}]

FindSequenceFunction[DeleteMissing[seq],n-2]

Table[(4^(n-1)),{n,3,10}]

ConnectedDominationNumber

Table[GraphData[{"Barbell",n},"ConnectedDominationNumber"],{n,3,20}]

ConnectedDominationPolynomial

(poly=Factor@Table[GraphData[{"Barbell",n},"ConnectedDominationPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,3,20}]

FullSimplify[poly2-poly]

ConnectedInducedSubgraphCount

A290718

seq=Table[GraphData[{"Barbell",n},"ConnectedInducedSubgraphCount"],{n,3,20}]

FindSequenceFunction[DeleteMissing@seq,n-2]//FullSimplify

seq=Table[(2^(n+1))+(4^(n-1))-2,{n,20}]

FindLinearRecurrence[seq]

LinearRecurrence[{7,-14,8},{3,10,30},40]

gf=x FindGeneratingFunction[seq,x]

CoefficientList[Series[((-3+11 x-2 (x^2))/(-1+7 x-14 (x^2)+8 (x^3))),{x,0,20}],x]

ConnectedInducedSubgraphPolynomial

(poly=DeleteCases[Factor@Table[GraphData[{"Barbell",n},"ConnectedInducedSubgraphPolynomial"][x],{n,k0=3,20}],_Missing[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,3,20}]

FullSimplify[poly2-poly]

CrossingNumber

seq=Table[GraphData[{"Barbell",n},"CrossingNumber"],{n,3,20}]

CycleCount

A002807

seq=Table[GraphData[{"Barbell",n},"CycleCount"],{n,3,20}]

Table[Sum[Binomial[n,k] (k-1)!,{k,3,n}],{n,3,20}]

CyclePolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"CyclePolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

poly2=Table[ Sum[(\[FormalK]-1)! Binomial[n,\[FormalK]](x^\[FormalK]),{\[FormalK],3,n}],{n,k0,20}]

FullSimplify[poly2-poly]

Cyclic

Table[GraphData[{"Barbell",n},"Cyclic"],{n,3,20}]

CyclomaticNumber

seq=Table[GraphData[{"Barbell",n},"CyclomaticNumber"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

DetourIndex

seq=Table[GraphData[{"Barbell",n},"DetourIndex"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

DetourMatrix

MatrixForm/@Table[GraphData[{"Barbell",n},"DetourMatrix"],{n,3,20}]

MatrixForm/@Table[SparseArray[{i_,j_}:>Abs[i-j],n],{n,3,20}]

DetourPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"DetourPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Diameter

seq=Table[GraphData[{"Barbell",n},"Diameter"],{n,3,20}]

DistanceMatrix

MatrixForm/@Table[GraphData[{"Barbell",n},"DistanceMatrix"],{n,3,20}]

MatrixForm/@Table[SparseArray[{i_,j_}:>Abs[i-j],n],{n,3,20}]

DistancePolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"DistancePolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

DistinguishingNumber

Probably n-1

seq=Table[GraphData[{"Barbell",n},"DistinguishingNumber"],{n,3,20}]

DomaticNumber

seq=Table[GraphData[{"Barbell",n},"DomaticNumber"],{n,3,20}]

DominatingSetCount

A060867

seq=Table[GraphData[{"Barbell",n},"DominatingSetCount"],{n,3,20}]

FindSequenceFunction[seq,n-2]//FullSimplify

Table[(2^n-1)^2,{n,30}]

DominationNumber

seq=Table[GraphData[{"Barbell",n},"DominationNumber"],{n,3,10}]

DominationPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"DominationPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

CoefficientList[Take[poly,5],x]

coef=Factor/@FindLinearRecurrence[poly]

p=.

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

EdgeChromaticNumber

seq=Table[GraphData[{"Barbell",n},"EdgeChromaticNumber"],{n,3,20}]

EdgeConnectivity

Table[GraphData[{"Barbell",n},"EdgeConnectivity"],{n,3,20}]

EdgeCount

seq=Table[GraphData[{"Barbell",n},"EdgeCount"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

EdgeCoverCount

seq=Table[GraphData[{"Barbell",n},"EdgeCoverCount"],{n,3,20}]

FindLinearRecurrence[DeleteMissing[seq]]

FindSequenceFunction[DeleteMissing[seq],n-2]

gf=x FindGeneratingFunction[DeleteMissing[seq],x]

g=GraphData[{"Barbell",3},"Graph","Labeled"]

GraphData[{"Barbell",3},"MinimumEdgeCovers"]/.Thread[Range[EdgeCount[g]]->EdgeList[g]]

g=GraphData[{"Barbell",4},"Graph","Labeled"]

GraphData[{"Barbell",4},"EdgeCount"]

GraphData[{"Barbell",4},"EdgeList"]

GraphData[{"Barbell",4},"MinimumEdgeCovers"]

GraphData[{"Barbell",4},"MinimumEdgeCovers"]/.i_Integer:>EdgeList[g][[i]]

Select[Subsets[EdgeList[g],{4}],EdgeCoverQ[g,#]&]

Length[%]

GraphData[{"Barbell",4},"EdgeCoverCount"]

GraphData[{"Barbell",4},"MinimumEdgeCoverCount"]

EdgeCoverNumber

seq=Table[GraphData[{"Barbell",n},"EdgeCoverNumber"],{n,3,20}]

EdgeCoverPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"EdgeCoverPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

EulerianCycleCount

seq=Table[GraphData[{"Barbell",n},"EulerianCycleCount"],{n,3,20}]

FaceCount

seq=Table[GraphData[{"Barbell",n},"FaceCount"],{n,3,20}]

FlowPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"FlowPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])

FractionalChromaticNumber

seq=Table[GraphData[{"Barbell",n},"FractionalChromaticNumber"],{n,3,20}]

FractionalEdgeChromaticNumber

seq=Table[GraphData[{"Barbell",n},"FractionalEdgeChromaticNumber"],{n,3,20}]

Girth

seq=Table[GraphData[{"Barbell",n},"Girth"],{n,3,20}]

Gonality

seq=Table[GraphData[{"Barbell",n},"Gonality"],{n,3,20}]

HamiltonConnected

seq=Table[GraphData[{"Barbell",n},"HamiltonConnected"],{n,3,20}]

HamiltonDecompositionCount

seq=Table[GraphData[{"Barbell",n},"HamiltonDecompositionCount"],{n,3,20}]

Hamiltonian

Table[GraphData[{"Barbell",n},"Hamiltonian"],{n,3,20}]

HamiltonianCycleCount

seq=Table[GraphData[{"Barbell",n},"HamiltonianCycleCount"],{n,3,20}]

HamiltonianNumber

Probably 2(n+1)

seq=Table[GraphData[{"Barbell",n},"HamiltonianNumber"],{n,3,20}]

HamiltonianPathCount

seq=Table[GraphData[{"Barbell",n},"HamiltonianPathCount"],{n,3,20}]

FindSequenceFunction[seq,n-2]//FunctionExpand

Table[Gamma[n]^2,{n,3,20}]

HamiltonianWalkCount

seq=Table[GraphData[{"Barbell",n},"HamiltonianWalkCount"],{n,3,20}]

HararyIndex

seq=Table[GraphData[{"Barbell",n},"HararyIndex"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

HexagonCount

seq=Table[GraphData[{"Barbell",n},"HexagonCount"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

5!Binomial[n,6]//FunctionExpand

IdiosyncraticPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"IdiosyncraticPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x,y]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

IndependenceNumber

seq=Table[GraphData[{"Barbell",n},"IndependenceNumber"],{n,3,20}]

IndependencePolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"IndependencePolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

IndependenceRatio

seq=Table[GraphData[{"Barbell",n},"IndependenceRatio"],{n,3,20}]

FindSequenceFunction[seq,n-2]

IndependentEdgeSetCount

A288841

Entity["Graph",{"Complete",n}]["IndependentEdgeSetCount"]

seq=Table[GraphData[{"Barbell",n},"IndependentEdgeSetCount"],{n,3,20}]

seq=Table[((((I/Sqrt[2])^n HermiteH[n,-I/Sqrt[2]]))^2)+((((I/Sqrt[2])^(n-1) HermiteH[n-1,-I/Sqrt[2]]))^2),{n,30}]

FullSimplify[((((I/Sqrt[2])^n HermiteH[n,-I/Sqrt[2]]))^2)+((((I/Sqrt[2])^(n-1) HermiteH[n-1,-I/Sqrt[2]]))^2),n∈Integers&&n>2]

FullSimplify[((((I/Sqrt[2])^n HermiteH[n,-I/Sqrt[2]]))^2)+((((I/Sqrt[2])^(n-1) HermiteH[n-1,-I/Sqrt[2]]))^2),n∈Integers]

Table[(((-(1/2)))^n) (((HermiteH[n,-(I/(Sqrt[2]))])^2)-2 ((HermiteH[-1+n,-(I/(Sqrt[2]))])^2)),{n,20}]

FullSimplify[(((HypergeometricU[-n/2,1/2,-1/2]/(-1/2)^(n/2)))^2)+(((HypergeometricU[-(n-1)/2,1/2,-1/2]/(-1/2)^((n-1)/2)))^2),n∈Integers]

Table[(((-2))^(n-2)) (((HypergeometricU[1-(n/2),(3/2),-(1/2)])^2)+4 ((HypergeometricU[-(n/2),(1/2),-(1/2)])^2)),{n,20}]

FindLinearRecurrence[DeleteMissing[seq]]

FindLinearRecurrence[Drop[DeleteMissing[seq],2]]

gf=(x^3)FindGeneratingFunction[DeleteMissing[seq],x]

IndependentVertexSetCount

A005563

seq=Table[GraphData[{"Barbell",n},"IndependentVertexSetCount"],{n,3,20}]

FindLinearRecurrence[seq]

seq=LinearRecurrence[{3,-3,1},{3,8,15},{0,20}]

seq=LinearRecurrence[{3,-3,1},{3,8,15},20]

gf=x FindGeneratingFunction[seq,x]//Factor

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

FindSequenceFunction[seq,n-2]//Simplify

Table[n^2-1,{n,42}]

Range[20]^2-1

IntersectionNumber

seq=Table[GraphData[{"Barbell",n},"IntersectionNumber"],{n,3,20}]

IrredundancePolynomial

(poly=DeleteMissing@Table[GraphData[{"Barbell",n},"IrredundancePolynomial"]/.f_Function:>f[x],{n,3,20}])//Column

Table[1+2n x+(n^2)(x^2),{x,3,20}]//Column

IrredundantSetCount

seq=Table[GraphData[{"Barbell",n},"IrredundantSetCount"],{n,3,20}]

FindSequenceFunction[DeleteMissing@seq,n-2]//Factor

KirchhoffIndex

seq=Table[GraphData[{"Barbell",n},"KirchhoffIndex"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

KirchhoffSumIndex

seq=Table[GraphData[{"Barbell",n},"KirchhoffSumIndex"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

LaplacianMatrix

MatrixForm/@Table[GraphData[{"Barbell",n},"LaplacianMatrix"],{n,3,20}]

LaplacianPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"LaplacianPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

(poly2=Table[(((x-n))^(2n-3))x(2-(n+2)x+(x^2)),{n,k0,kmax}])//Column

FullSimplify[poly2-poly]

LeafCount

seq=Table[GraphData[{"Barbell",n},"LeafCount"],{n,3,20}]

LongestCycleCount

seq=Table[GraphData[{"Barbell",n},"LongestCycleCount"],{n,3,20}]

FindSequenceFunction[seq,n-2]//FunctionExpand

LovaszNumber

seq=Table[GraphData[{"Barbell",n},"LovaszNumber"],{n,3,20}]

MatchingGeneratingPolynomial

Entity["Graph",{"Complete",n}]["MatchingGeneratingPolynomial"]

bug(335931)

Entity["Graph",{"Complete",n}]["MatchingGeneratingPolynomial"][x]

(poly=Factor[Table[GraphData[{"Barbell",n},"MatchingGeneratingPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

Table[FindSequenceFunction[Coefficient[poly,x,k],n],{k,0,6}]//Factor//Column

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

MatchingNumber

seq=Table[GraphData[{"Barbell",n},"MatchingNumber"],{n,3,20}]

FindSequenceFunction[seq,n-2]

MatchingPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"MatchingPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

CoefficientList[Take[poly,5][[All,1]],x]

coef1=Factor/@FindLinearRecurrence[DeleteMissing@poly[[All,1]]]

coef2=Factor/@FindLinearRecurrence[DeleteMissing@poly[[All,2]]]

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

MaximalCliqueCount

seq=Table[GraphData[{"Barbell",n},"MaximalCliqueCount"],{n,3,20}]

MaximalIndependentEdgeSetCount

seq=Table[GraphData[{"Barbell",n},"MaximalIndependentEdgeSetCount"],{n,3,20}]

Table[Piecewise[{{2((n-1)!!)^2,Mod[n,2]==0},{(n!!)^2,Mod[n,2]==1}}],{n,3,20}]

MaximalIndependentEdgeSetSignature

seq=Table[GraphData[{"Barbell",n},"MaximalIndependentEdgeSetSignature"],{n,3,20}]

seq[[1;;8;;2]]

Divide@@@seq[[1;;8;;2]][[All,All,2]]

FindSequenceFunction[%,n]//Factor

Table[4 n (1+n),{n,4}]

Table[4 (n-1)/2(1+(n-1)/2),{n,3,10,2}]

Simplify[4 (n-1)/2(1+(n-1)/2)]

Table[{{n-1,((n^2)-1)(((n-2)!!)^2)},{n,((n-2)!!)^2}},{n,3,10,2}]

seq[[2;;7;;2]][[All,All,2]][[All,1]]

Table[((n-1)!!)^2,{n,2,8,2}]

Table[Piecewise[{
{{{n-1,((n-1)!!)^2},{n,((n-1)!!)^2}},Mod[n,2]==0},
{{{n-1,((n^2)-1)(((n-2)!!)^2)},{n,((n-2)!!)^2}},Mod[n,2]==1}}],{n,3,9}]

%==DeleteMissing@seq

Table[Piecewise[{
{{{n-1,((n-1)!!)^2},{n,((n-1)!!)^2}},Mod[n,2]==0},
{{{n-1,((n^2)-1)(((n-2)!!)^2)},{n,((n-2)!!)^2}},Mod[n,2]==1}}][[All,2]]//Total,{n,3,20}]

MaximalIndependentVertexSetCount

seq=Table[GraphData[{"Barbell",n},"MaximalIndependentVertexSetCount"],{n,3,20}]

FindLinearRecurrence[seq]

FindSequenceFunction[seq,n-2]//Simplify

MaximalIrredundantSetCount

seq=Table[GraphData[{"Barbell",n},"MaximalIrredundantSetCount"],{n,3,20}]

FindSequenceFunction[DeleteMissing@seq,n-2]//Factor

MaximumCliqueCount

seq=Table[GraphData[{"Barbell",n},"MaximumCliqueCount"],{n,3,20}]

MaximumIndependentEdgeSetCount

seq=Table[GraphData[{"Barbell",n},"MaximumIndependentEdgeSetCount"],{n,3,20}]

seq2=DeleteMissing@seq[[2;;All;;2]]

FindLinearRecurrence[seq2]

FindSequenceFunction[seq2,n]

Table[((2Floor[n/2]-1)!!)^2,{n,3,20}]

MaximumIndependentVertexSetCount

seq=Table[GraphData[{"Barbell",n},"MaximumIndependentVertexSetCount"],{n,3,20}]

FindLinearRecurrence[seq]

FindSequenceFunction[seq,n-2]//Simplify

MaximumIrredundantSetCount

seq=Table[GraphData[{"Barbell",n},"MaximumIrredundantSetCount"],{n,3,20}]

FindSequenceFunction[DeleteMissing@seq,n-2]//Simplify

MaximumLeafNumber

seq=Table[GraphData[{"Barbell",n},"MaximumLeafNumber"],{n,3,20}]

FindSequenceFunction[seq,n-2]

MaximumVertexDegree

seq=Table[GraphData[{"Barbell",n},"MaximumVertexDegree"],{n,3,20}]

MeanDistance

seq=Table[GraphData[{"Barbell",n},"MeanDistance"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

MinimalDominatingSetCount

seq=Table[GraphData[{"Barbell",n},"MinimalDominatingSetCount"],{n,3,20}]

FindSequenceFunction[DeleteMissing@seq,n-2]//Factor

MinimalDominatingSetSignature

seq=Table[GraphData[{"Barbell",n},"MinimalDominatingSetSignature"],{n,3,20}]

MinimalEdgeCoverCount

A290715

seq=Table[GraphData[{"Barbell",n},"MinimalEdgeCoverCount"],{n,3,20}]

Table[GraphData[{"Barbell",n},"EdgeCoverCount"],{n,3,20}]

FindSequenceFunction[DeleteMissing@seq,n-2]//Factor

MinimumCliqueCoveringCount

seq=Table[GraphData[{"Barbell",n},"MinimumCliqueCoveringCount"],{n,3,20}]

MinimumConnectedDominatingSetCount

seq=Table[GraphData[{"Barbell",n},"MinimumConnectedDominatingSetCount"],{n,3,20}]

MinimumDominatingSetCount

seq=Table[GraphData[{"Barbell",n},"MinimumDominatingSetCount"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Simplify

MinimumEdgeCoverCount

seq=Table[GraphData[{"Barbell",n},"MinimumEdgeCoverCount"],{n,3,20}]

{1,3,3,15,15}^2?

Table[(2n-1)!!,{n,4}]

105^2

MinimumVertexDegree

seq=Table[GraphData[{"Barbell",n},"MinimumVertexDegree"],{n,3,20}]

MolecularTopologicalIndex

seq=Table[GraphData[{"Barbell",n},"MolecularTopologicalIndex"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

FindGeneratingFunction[seq,x]//Facto

Nonhamiltonian

Table[GraphData[{"Barbell",n},"Nonhamiltonian"],{n,3,20}]

NormalizedLaplacianMatrix

MatrixForm/@Table[GraphData[{"Barbell",n},"NormalizedLaplacianMatrix"],{n,3,20}]

OddChordlessCycleCount

seq=Table[GraphData[{"Barbell",n},"OddChordlessCycleCount"],{n,3,20}]

PathCount

A288703

seq=Table[GraphData[{"Barbell",n},"PathCount"],{n,3,20}]

sum(i=0,n,n!/i!);

Sum[n!/i!,{i,0,n}]//FullSimplify

Table[(((E Gamma[n,1]))^2)+E Gamma[1+n,1]-n-1,{n,20}]

FullSimplify[(E^2) ((Gamma[n,1])^2)+E Gamma[1+n,1]-n-1]

Table[E (E ((Gamma[n,1])^2)+Gamma[1+n,1])-n-1,{n,20}]

FindLinearRecurrence[DeleteMissing@seq]

FindSequenceFunction[DeleteMissing@seq,n-2]

gf=x FindGeneratingFunction[DeleteMissing@seq,x]

FullSimplify[SeriesCoefficient[gf,{x,0,n}],n>0]

PathPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"PathPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

PentagonCount

seq=Table[GraphData[{"Barbell",n},"PentagonCount"],{n,3,20}]

FindLinearRecurrence[seq]

FindSequenceFunction[seq,n-2]//Factor

Perfect

Table[GraphData[{"Barbell",n},"Perfect"],{n,3,20}]

ProjectivePlaneCrossingNumber

seq=Table[GraphData[{"Barbell",n},"ProjectivePlaneCrossingNumber"],{n,3,20}]

Radius

seq=Table[GraphData[{"Barbell",n},"Radius"],{n,3,20}]

RankPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"RankPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x,y]])//Column

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

RectilinearCrossingNumber

seq=Table[GraphData[{"Barbell",n},"RectilinearCrossingNumber"],{n,3,20}]

FindSequenceFunction[DeleteMissing@seq,n-2]

ReliabilityPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"ReliabilityPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

SigmaPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"SigmaPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

SpanningTreeCount

A193129

seq=Table[GraphData[{"Barbell",n},"SpanningTreeCount"],{n,3,20}]

Table[n^(2n-4),{n,3,20}]

SquareCount

seq=Table[GraphData[{"Barbell",n},"SquareCount"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

StabilityIndex

seq=Table[GraphData[{"Barbell",n},"StabilityIndex"],{n,3,20}]

FindSequenceFunction[seq,n-2]//FullSimplify//Factor

TopologicalIndex

seq=Table[GraphData[{"Barbell",n},"TopologicalIndex"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

ToroidalCrossingNumber

seq=Table[GraphData[{"Barbell",n},"ToroidalCrossingNumber"],{n,3,20}]

Traceable

Table[GraphData[{"Barbell",n},"Traceable"],{n,3,20}]

TriangleCount

seq=Table[GraphData[{"Barbell",n},"TriangleCount"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

TuttePolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"TuttePolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x,y]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Untraceable

Table[GraphData[{"Barbell",n},"Untraceable"],{n,3,20}]

VertexConnectivity

Table[GraphData[{"Barbell",n},"VertexConnectivity"],{n,3,20}]

VertexCount

seq=Table[GraphData[{"Barbell",n},"VertexCount"],{n,3,20}]

FindSequenceFunction[seq,n-2]

VertexCoverNumber

vertex cover number == vertex count - independence number

seq=Table[GraphData[{"Barbell",n},"VertexCoverNumber"],{n,3,20}]

FindSequenceFunction[seq,n-2]

VertexCoverPolynomial

(poly=Factor[Table[GraphData[{"Barbell",n},"VertexCoverPolynomial"],{n,k0=3,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

VertexDegrees

seq=Table[GraphData[{"Barbell",n},"VertexDegrees"],{n,3,20}]

VertexTransitive

Table[GraphData[{"Barbell",n},"VertexTransitive"],{n,3,20}]

WienerIndex

seq=Table[GraphData[{"Barbell",n},"WienerIndex"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

WienerSumIndex

seq=Table[GraphData[{"Barbell",n},"WienerSumIndex"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

GraphData

GraphClassString

GraphClassString[Select[GraphData["Barbell"],GraphData[#,"V"]>0&]]

GraphDataString

Do[Print[GraphDataString[BarbellGraph[n],{{"Barbell",n},ToString[n]<>"-barbell graph","BarbellGraph"},Debug->True,TimeConstraint->60]],{n,4,20}]