Second Zagreb Index

Author

Eric W. Weisstein
February 22, 2023

This notebook downloaded from http://www.ericweisstein.com.

For more information, see Eric's none entry http://www.ericweisstein.com.

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

GraphDataCountTable

GraphDataCountTable["ZagrebIndex2"]

Parametrized families

<<MathWorld`Graphs`

Alkane

seq=Table[GraphData[{"Alkane",n},"ZagrebIndex2"],{n,10}]

FindSequenceFunction[seq,n]

AlternatingGroupGraph

seq=Table[GraphData[{"AlternatingGroupGraph",n},"ZagrebIndex2"],{n,2,6}]

(seq=Table[ZagrebIndex2[AlternatingGroupGraph[n]],{n,2,9}])//Timing

FindSequenceFunction[seq,n-1]//Head//Timing

Andrasfai

seq=Table[GraphData[{"Andrasfai",n},"ZagrebIndex2"],{n,10}]

FindSequenceFunction[seq,n]//Factor

Antelope n×n

seq=Table[GraphData[{"Antelope",{n,n}},"ZagrebIndex2"],{n,15}]

seq=Table[ZagrebIndex2[AntelopeGraph[n,n]],{n,25}]

FindSequenceFunction[seq,n]//Head//Timing

gf=x FindGeneratingFunction[seq,x]

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

Antiprism

Entity["Graph",{"Antiprism",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Antiprism",n},"ZagrebIndex2"],{n,3,25}]

FindSequenceFunction[seq,n-2]//Factor

Apollonian

seq=Table[GraphData[{"Apollonian",n},"ZagrebIndex2"],{n,5}]

(seq=Table[ZagrebIndex2[ApollonianGraph[n]],{n,10}])//Timing

FindSequenceFunction[seq,n]//Head//Timing

Barbell

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

FindSequenceFunction[seq,n-2]//Factor

BlackBishop n×n

seq=Table[GraphData[{"BlackBishop",{n,n}},"ZagrebIndex2"],{n,10}]

seq=Table[ZagrebIndex2[BlackBishopGraph[n,n]],{n,25}]

FindSequenceFunction[seq,n]//Head//Timing

gf=x FindGeneratingFunction[seq,x]

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

Bishop n×n

seq=Table[GraphData[{"Bishop",{n,n}},"ZagrebIndex2"],{n,10}]

seq=Table[ZagrebIndex2[BishopGraph[n,n]],{n,20}]

FindSequenceFunction[seq,n]//Head//Timing

gf=x FindGeneratingFunction[seq,x]

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

Book

seq=Table[GraphData[{"Book",n},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq,n]//Factor

Bruhat

seq=Table[GraphData[{"Bruhat",n},"ZagrebIndex2"],{n,6}]

seq=Table[ZagrebIndex2[BruhatGraph[n]],{n,9}]

FindSequenceFunction[seq,n]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

Camel n×n

seq=Table[GraphData[{"Camel",{n,n}},"ZagrebIndex2"],{n,10}]

seq=Table[ZagrebIndex2[CamelGraph[n,n]],{n,20}]

FindSequenceFunction[seq,n]//Head//Timing

gf=x FindGeneratingFunction[seq,x]

SeriesCoefficient[gf,{x,0,n}]//Factor

Centipede

seq=Table[GraphData[{"Centipede",n},"ZagrebIndex2"],{n,10}]

FindSequenceFunction[seq,n]

gf=x FindGeneratingFunction[seq,x]

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

CocktailParty

seq=Table[GraphData[{"CocktailParty",n},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq,n]//Factor

Complete

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

seq=Table[GraphData[{"Complete",n},"ZagrebIndex2"],{n,30}]

FindSequenceFunction[seq,n]//Factor

CompleteBipartite m×n

Entity["Graph",{"CompleteBipartite",{m,n}}]["ZagrebIndex2"]

DeleteCases[Flatten[Table[{
{m,n},
GraphData[{"CompleteBipartite",{m,n}},"ZagrebIndex2"],
(((m n))^2)
},{n,10},{m,n}],1],
{_,x_,x_}]

CompleteBipartite n×n

Entity["Graph",{"CompleteBipartite",{n,n}}]["ZagrebIndex2"]

seq=Table[GraphData[{"CompleteBipartite",{n,n}},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq,n]//FullSimplify

CompleteTripartite k×m×n

Entity["Graph",{"CompleteTripartite",{k,m,n}}]["ZagrebIndex2"]

DeleteCases[Flatten[Table[{
{m,n},
GraphData[{"CompleteTripartite",{k,m,n}},"ZagrebIndex2"],
XXX
},{n,10},{m,n},{k,m}],2],
{_,x_,x_}]

CompleteTripartite n×n×n

Entity["Graph",{"CompleteTripartite",{n,n,n}}]["ZagrebIndex2"]

seq=Table[GraphData[{"CompleteTripartite",{n,n,n}},"ZagrebIndex2"],{n,10}]

FindSequenceFunction[seq,n]//FullSimplify

CrossedPrism

seq=Table[GraphData[{"CrossedPrism",2n},"ZagrebIndex2"],{n,2,10}]

FindSequenceFunction[seq,n-1]//Factor

Crown

seq=Table[GraphData[{"Crown",n},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq,n]//FullSimplify

CubeConnectedCycle

Entity["Graph",{"CubeConnectedCycle",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"CubeConnectedCycle",n},"ZagrebIndex2"],{n,3,8}]

FindSequenceFunction[seq,n-2]//FullSimplify

Cycle

Entity["Graph",{"Cycle",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Cycle",n},"ZagrebIndex2"],{n,3,30}]

FullSimplify[FindSequenceFunction[seq,n-2],n∈Integers]

CycleComplement

seq=Table[GraphData[{"CycleComplement",n},"ZagrebIndex2"],{n,3,20}]

FullSimplify[FindSequenceFunction[seq,n-2],n∈Integers]

DiagonalIntersection

seq=Table[GraphData[{"DiagonalIntersection",n},"ZagrebIndex2"],{n,3,14}]

FindSequenceFunction[seq,n-2]//Head//Timing

Dipyramid

seq=Table[GraphData[{"Dipyramid",n},"ZagrebIndex2"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

DoubleCone

seq=Table[GraphData[{"DoubleCone",n},"ZagrebIndex2"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

Empty

Entity["Graph",{"Empty",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Empty",n},"ZagrebIndex2"],{n,30}]

FibonacciCube

seq=Table[GraphData[{"FibonacciCube",n},"ZagrebIndex2"],{n,15}]

(seq=Table[ZagrebIndex2[FibonacciCubeGraph[n]],{n,17}])//Timing

FindSequenceFunction[seq,n]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

Flower

seq=Table[GraphData[{"Flower",n},"ZagrebIndex2"],{n,5,20}]

FindSequenceFunction[seq,n]//Head//Timing

gf=x FindGeneratingFunction[seq,x]

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

FoldedCube

seq=Table[GraphData[{"FoldedCube",n},"ZagrebIndex2"],{n,2,10}]

seq=Table[ZagrebIndex2[FoldedCubeGraph[n]],{n,2,11}]

FindSequenceFunction[seq,n-1]//Head//Timing

gf=(x^2)FindGeneratingFunction[seq,x]

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

Gear

seq=Table[GraphData[{"Gear",n},"ZagrebIndex2"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

Giraffe n×n

seq=Table[GraphData[{"Giraffe",{n,n}},"ZagrebIndex2"],{n,20}]

seq=Table[ZagrebIndex2[GiraffeGraph[n,n]],{n,25}]

FindSequenceFunction[seq,n]//Head//Timing

gf=x FindGeneratingFunction[seq,x]

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

Goldberg

seq=Table[GraphData[{"Goldberg",n},"ZagrebIndex2"],{n,3,10}]

FindSequenceFunction[seq,n-2]

Grid m×n

Entity["Graph",{"Grid",{m,n}}]["ZagrebIndex2"]

Grid n×n

Entity["Graph",{"Grid",{n,n}}]["ZagrebIndex2"]

seq=Table[GraphData[{"Grid",{n,n}},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq,n]

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

SeriesCoefficient[gf,{x,0,n}]//FullSimplify//Factor

Table[Piecewise[{{0,n==1},{16,n==2}},4 (8 (n^2)-19 n+9)],{n,20}]==seq

Grid k×m×n

Entity["Graph",{"Grid",{k,m,n}}]["ZagrebIndex2"]

Sort@Flatten[Table[{
{k,m,n},
GraphData[{"Grid",{k,m,n}},"ZagrebIndex2"],
(((k+m+n) (k m n-1))/(3 k m n))
},{n,5},{m,n},{k,m}],2]

Tally[GraphData[{"Grid",{2,3,4}},"DistanceMatrix"]//Normal//Flatten]

Grid n×n×n

Entity["Graph",{"Grid",{n,n,n}}]["ZagrebIndex2"]

seq=Table[GraphData[{"Grid",{n,n,n}},"ZagrebIndex2"],{n,10}]

FindSequenceFunction[seq,n]

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

SeriesCoefficient[gf,{x,0,n}]//FullSimplify//Factor

Table[Piecewise[{{0,n==1},{108,n==2}},12 (9 (n^3)-23 (n^2)+15 n-2)],{n,10}]==seq

HalvedCube

seq=Table[GraphData[{"HalvedCube",n},"ZagrebIndex2"],{n,10}]

(seq=Table[ZagrebIndex2[HalvedCubeGraph[n]],{n,15}])//Timing

FindSequenceFunction[seq,n]

Hanoi

seq=Table[GraphData[{"Hanoi",n},"ZagrebIndex2"],{n,5}]

FindSequenceFunction[seq,n]//Head//Timing

gf=x FindGeneratingFunction[seq,x]

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

Helm

seq=Table[GraphData[{"Helm",n},"ZagrebIndex2"],{n,3,20}]

FindSequenceFunction[seq,n]//Factor

Hypercube

Entity["Graph",{"Hypercube",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Hypercube",n},"ZagrebIndex2"],{n,0,10}]

FindSequenceFunction[seq,n+1]

Keller

Entity["Graph",{"Keller",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Keller",n},"ZagrebIndex2"],{n,5}]

(seq=Table[ZagrebIndex2[KellerGraph[n]],{n,6}])//Timing

FindSequenceFunction[seq,n]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

Entity["Graph",{"Keller",n}]["Regular"]

seq=Table[GraphData[{"Keller",n},"Regular"],{n,5}]

seq=Table[GraphData[{"Keller",n},"EdgeTransitive"],{n,5}]

Entity["Graph",{"Keller",n}]["EdgeCount"]

Entity["Graph",{"Keller",n}]["MinimumVertexDegree"]

Factor[(2^(-1+2 n)) (-(3^n)+(4^n)-n)(((-(3^n)+(4^n)-n))^2)]

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

King n×n

seq=Table[GraphData[{"King",{n,n}},"ZagrebIndex2"],{n,10}]

FindSequenceFunction[seq,n]//Factor

gf=x FindGeneratingFunction[seq,x]

SeriesCoefficient[gf,{x,0,n}]//Factor

Knight m×n

Entity["Graph",{"Knight",{m,n}}]["ZagrebIndex2"]

Knight n×n

Entity["Graph",{"Knight",{n,n}}]["ZagrebIndex2"]

seq=Table[GraphData[{"Knight",{n,n}},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq,n]

gf=x FindGeneratingFunction[seq,x]

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

Table[Piecewise[{{0,n==1||n==2},{32,n==3},{232,n==4},{864,n==5}},16 (16 (n^2)-100 n+151)],{n,20}]==seq

Ladder

Entity["Graph",{"Ladder",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Ladder",n},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq,n]//Factor

gf=x FindGeneratingFunction[seq,x]

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

Table[Piecewise[{{1,n==1},{16,n==2}},27n-40],{n,20}]==seq

LadderRung

seq=Table[GraphData[{"LadderRung",n},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq,n]

MengerSponge

seq=Table[GraphData[{"MengerSponge",n},"ZagrebIndex2"],{n,3}]

(seq=Table[ZagrebIndex2[MengerSpongeGraph[n]],{n,5}])//Timing

gf=x FindGeneratingFunction[seq,x]

MoebiusLadder

Entity["Graph",{"MoebiusLadder",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"MoebiusLadder",n},"ZagrebIndex2"],{n,3,25}]

FindSequenceFunction[seq,n-2]

Mycielski

Entity["Graph",{"Mycielski",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Mycielski",n},"ZagrebIndex2"],{n,11}]

(seq=Table[ZagrebIndex2[MycielskiGraph[n]],{n,15}])//Timing

FindSequenceFunction[seq,n]//Head//Timing

gf=x FindGeneratingFunction[seq,x]

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

Odd

Entity["Graph",{"Odd",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Odd",n},"ZagrebIndex2"],{n,7}]

(seq=Table[ZagrebIndex2[OddGraph[n]],{n,8}])//Timing

FindSequenceFunction[seq,n]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

Pan

seq=Table[GraphData[{"Pan",n},"ZagrebIndex2"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

Path

Entity["Graph",{"Path",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Path",n},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq,n]

gf=x FindGeneratingFunction[seq,x]

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

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

PathComplement

seq=Table[GraphData[{"PathComplement",n},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq, n ]

gf=x FindGeneratingFunction[seq,x]

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

Prism

Entity["Graph",{"Prism",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Prism",n},"ZagrebIndex2"],{n,3,25}]

FindSequenceFunction[seq,n-2]

Queen n×n

seq=Table[GraphData[{"Queen",{n,n}},"ZagrebIndex2"],{n,20}]

FindSequenceFunction[seq,n]//Head//Timing

gf=x FindGeneratingFunction[seq,x]

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

Rook n×n

seq=Table[GraphData[{"Rook",{n,n}},"ZagrebIndex2"],{n,20}]

FullSimplify[FindSequenceFunction[seq,n],n∈Integers]//Factor

RookComplement n×n

seq=Table[GraphData[{"RookComplement",{n,n}},"ZagrebIndex2"],{n,10}]

(seq=Table[ZagrebIndex2[GraphComplement[RookGraph[n,n]]],{n,20}])//Timing

FindSequenceFunction[seq,n]//Factor

SierpinskiCarpet

seq=Table[GraphData[{"SierpinskiCarpet",n},"ZagrebIndex2"],{n,4}]

(seq=Table[ZagrebIndex2[SierpinskiCarpetGraph[n]],{n,6}])//Timing

FindSequenceFunction[seq,n]//Factor

SierpinskiGasket

seq=Table[GraphData[{"SierpinskiGasket",n},"ZagrebIndex2"],{n,5}]

(seq=Table[ZagrebIndex2[SierpinskiGasketGraph[n]],{n,6}])//Timing

FindSequenceFunction[seq,n]

gf=x FindGeneratingFunction[seq,x]

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

SierpinskiTetrahedron

seq=Table[GraphData[{"SierpinskiTetrahedron",n},"ZagrebIndex2"],{n,6}]

FindSequenceFunction[seq,n]

gf=x FindGeneratingFunction[seq,x]

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

StackedBook

seq=Table[GraphData[{"StackedBook",{n,n}},"ZagrebIndex2"],{n,10}]

gf=x FindGeneratingFunction[seq,x]

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

StackedPrism

seq=Table[GraphData[{"StackedPrism",{n,n}},"ZagrebIndex2"],{n,3,5}]

(seq=Table[ZagrebIndex2[PrismGraph[n,n]],{n,3,10}])//Timing

gf=x FindGeneratingFunction[seq,x]

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

Star

Entity["Graph",{"Star",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Star",n},"ZagrebIndex2"],{n,25}]

FindSequenceFunction[seq,n]//Factor

Sun

seq=Table[GraphData[{"Sun",n},"ZagrebIndex2"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

Sunlet

seq=Table[GraphData[{"Sunlet",n},"ZagrebIndex2"],{n,3,20}]

FullSimplify[FindSequenceFunction[seq,n-2],n∈Integers]

TorusGrid n×n

seq=Table[GraphData[{"TorusGrid",{n,n}},"ZagrebIndex2"],{n,3,10}]

FullSimplify[FindSequenceFunction[seq,n-2],n∈Integers]

Transposition

Entity["Graph",{"Transposition",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Transposition",n},"ZagrebIndex2"],{n,6}]

(seq=Table[ZagrebIndex2[TranspositionGraph[n]],{n,7}])//Timing

FindSequenceFunction[seq,n]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

Entity["Graph",{"Transposition",n}]["Regular"]

seq=Table[GraphData[{"Transposition",n},"EdgeTransitive"],{n,5}]

Entity["Graph",{"Transposition",n}]["EdgeCount"]

Entity["Graph",{"Transposition",n}]["MinimumVertexDegree"]

Binomial[n,2]

Table[(1/2) ((Binomial[n,2])^3) n!,{n,7}]

Trapezohedron

Entity["Graph",{"Trapezohedron",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Trapezohedron",n},"ZagrebIndex2"],{n,3,20}]

FullSimplify[FindSequenceFunction[seq,n-2],n∈Integers]

Triangular

seq=Table[GraphData[{"Triangular",n},"ZagrebIndex2"],{n,2,10}]

FindSequenceFunction[seq,n-1]//Factor

TriangularGrid

seq=Table[GraphData[{"TriangularGrid",n},"ZagrebIndex2"],{n,0,10}]

FindSequenceFunction[seq,n+1]//FullSimplify

gf=x FindGeneratingFunction[seq,x]

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

TriangularHoneycombAcuteKnight

seq=Table[GraphData[{"TriangularHoneycombAcuteKnight",n},"ZagrebIndex2"],{n,20}]

gf=x FindGeneratingFunction[seq,x]

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

TriangularHoneycombBishop

seq=Table[GraphData[{"TriangularHoneycombBishop",n},"ZagrebIndex2"],{n,9}]

FindSequenceFunction[seq,n]//Factor

TriangularHoneycombObtuseKnight

seq=Table[GraphData[{"TriangularHoneycombObtuseKnight",n},"ZagrebIndex2"],{n,20}]

gf=x FindGeneratingFunction[seq,x]

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

TriangularHoneycombQueen

seq=Table[GraphData[{"TriangularHoneycombQueen",n},"ZagrebIndex2"],{n,10}]

FindSequenceFunction[seq,n]//Factor

TriangularHoneycombRook

seq=Table[GraphData[{"TriangularHoneycombRook",n},"ZagrebIndex2"],{n,10}]

FindSequenceFunction[seq,n]//Factor

TriangularSnake

seq=Table[GraphData[{"TriangularSnake",n},"ZagrebIndex2"],{n,1,20,2}]

FindSequenceFunction[seq,n]//Factor

gf=x FindGeneratingFunction[seq,x]

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

Web

seq=Table[GraphData[{"Web",n},"ZagrebIndex2"],{n,3,20}]

FindSequenceFunction[seq,n-2]//Factor

Wheel

Entity["Graph",{"Wheel",n}]["ZagrebIndex2"]

seq=Table[GraphData[{"Wheel",n},"ZagrebIndex2"],{n,4,20}]

FindSequenceFunction[seq,n-3]//Factor

WheelComplement

seq=Table[GraphData[{"WheelComplement",n},"ZagrebIndex2"],{n,4,20}]

FindSequenceFunction[seq,n-3]//FullSimplify

WhiteBishop n×n

seq=Table[GraphData[{"WhiteBishop",{n,n}},"ZagrebIndex2"],{n,2,10}]

(seq=Table[ZagrebIndex2[WhiteBishopGraph[n,n]],{n,2,20}])//Timing

FindSequenceFunction[seq,n-1]//Head//Timing

gf=(x^2) FindGeneratingFunction[seq,x]

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

Zebra n×n

seq=Table[GraphData[{"Zebra",{n,n}},"ZagrebIndex2"],{n,20}]

gf=x FindGeneratingFunction[seq,x]

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