Wiener Sum Index

Author

Eric W. Weisstein
April 19, 2020

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

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

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

Missing

DateString[]

GraphData["WienerSumIndex","Missing"]

Parametrized families

GraphDataCountTable["WienerSumIndex"]

Andrasfai

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

(seq=Table[WienerSumIndex[AndrasfaiGraph[n]],{n,20}])//Timing

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

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

Antelope n×n

seq=Table[GraphData[{"Antelope",{n,n}},"WienerSumIndex"],{n,10}]

(seq=Table[WienerSumIndex[AntelopeGraph[n,n]],{n,15}])//Timing

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-1]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Antiprism

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

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

(seq=Table[WienerSumIndex[AntiprismGraph[n]],{n,3,30}])//Timing

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

FindSequenceFunction[Rest@seq,n-3]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Table[Tally[Flatten[GraphDistanceMatrix[g=AntiprismGraph[n]]/(IdentityMatrix[VertexCount[g]]+ResistanceMatrix[g])]],{n,3,10}]//Column

Apollonian

seq=Table[GraphData[{"Apollonian",n},"WienerSumIndex"],{n,6}]

(seq=Table[WienerSumIndex[ApollonianGraph[n]],{n,6}]);//Timing

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

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

Bishop n×n

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

BlackBishop n×n

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

(seq=Table[WienerSumIndex[BlackBishopGraph[n,n]],{n,15}])//Timing

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-1]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Bruhat

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

Do[Print[{k,FindSequenceFunction[Drop[DeleteMissing@seq,k],n-k]//Head//Timing}],{k,0,3}]

(seq=Table[WienerSumIndex[BruhatGraph[n]],{n,6}])//Timing

Do[Print[{k,FindSequenceFunction[Drop[seq,k],n-k]//Head//Timing}],{k,0,3}]

Centipede

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

FindSequenceFunction[seq,n]//Factor

CocktailParty

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

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

Complete

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

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

FindSequenceFunction[l,n]//FullSimplify

CompleteBipartite m×n

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

CompleteBipartite n×n

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

seq=Table[GraphData[{"CompleteBipartite",{n,n}},"WienerSumIndex"],{n,10}]

FindSequenceFunction[seq,n]//Factor

CompleteTripartite k×m×n

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

CompleteTripartite n×n×n

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

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

FindSequenceFunction[seq,n]//Factor

CrossedPrism

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

(seq=Table[WienerSumIndex[CrossedPrismGraph[2n]],{n,2,25}])//Timing

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

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

FindSequenceFunction[seq[[;;;;2]]]//Head//Timing

FindSequenceFunction[seq[[3;;;;2]]]//Head//Timing

FindSequenceFunction[seq[[2;;;;2]]]//Head//Timing

Crown

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

FindSequenceFunction[seq,n-2]//Factor

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

CubeConnectedCycle

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

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

(seq=Table[WienerSumIndex[CubeConnectedCycleGraph[n]],{n,3,5}])//Timing

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

FindSequenceFunction[Rest@seq,n-4]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Cycle

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

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

(seq=Table[WienerSumIndex[CycleGraph[n]],{n,3,30}])//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

Table[(1/2) (n^2) (HarmonicNumber[(1/2) (-1+n)]-HarmonicNumber[(n/2)]+Log[4]),{n,4,20,2}]//FullSimplify

Table[HarmonicNumber[(1/2) (-1+n)]-HarmonicNumber[(n/2)]+Log[4],{n,4,30,2}]//FunctionExpand//FullSimplify

Sum[(1/(n+k)),{k,n}]//FullSimplify

Table[2(HarmonicNumber[2(n+1)]-HarmonicNumber[n+1]),{n,20}]

FullSimplify[(HarmonicNumber[(1/2) (-1+n)]-HarmonicNumber[(n/2)]+Log[4])]

bug(344039): FullSimplify[(HarmonicNumber[1/2 (-1 + n)] - HarmonicNumber[n/2] + Log[4])] could return 2 (HarmonicNumber[n] - HarmonicNumber[n/2]) (difference FullSimplify's to 0 already)

FullSimplify[Subtract@@{
(HarmonicNumber[(1/2) (-1+n)]-HarmonicNumber[(n/2)]+Log[4]),
2(HarmonicNumber[n]-HarmonicNumber[n/2])
}]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Table[(1/2) (n^2) (Log[4]+PolyGamma[0,(n/2)]-PolyGamma[0,((1+n)/2)]),{n,3,20,2}]//FullSimplify

FullSimplify[ (Log[4]+PolyGamma[0,(n/2)]-PolyGamma[0,((1+n)/2)])]

FullSimplify[Subtract@@{
 (Log[4]+PolyGamma[0,(n/2)]-PolyGamma[0,((1+n)/2)]),
2(HarmonicNumber[n-1]-HarmonicNumber[(n-1)/2])
}]

Table[ (Log[4]+PolyGamma[0,(n/2)]-PolyGamma[0,((1+n)/2)]),{n,3,40,2}]//FunctionExpand//FullSimplify

Table[2(HarmonicNumber[n-1]-HarmonicNumber[(n-1)/2]),{n,3,20,2}]//FullSimplify

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

%==seq

(n^2) ((HarmonicNumber[2 (Floor[(n/2)])])-(HarmonicNumber[(Floor[(n/2)])]))

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

%==seq

DiagonalIntersection

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

Do[Print[{k,FindSequenceFunction[Drop[DeleteMissing@seq,k],n-k]//Head//Timing}],{k,0,3}]

Dipyramid

seq=Table[GraphData[{"Dipyramid",n},"WienerSumIndex"],{n,3,14}]

Do[Print[{k,FindSequenceFunction[Drop[DeleteMissing@seq,k],n-k]//Head//Timing}],{k,0,3}]

Empty

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

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

FibonacciCube

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

(seq=Table[WienerSumIndex[FibonacciCubeGraph[n]],{n,10}]);//Timing

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-1]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Fiveleaper n×n

seq=Table[GraphData[{"Fiveleaper",{n,n}},"WienerSumIndex"],{n,10}]

(seq=Table[WienerSumIndex[FiveleaperGraph[n,n]],{n,8}])//Timing

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-1]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

FoldedCube

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

(seq=Table[WienerSumIndex[FoldedCubeGraph[n]],{n,2,9}])//Timing

Table[Print[{g={"FoldedCube",n},{t,res}=MemoryConstrained[WienerSumIndex[FoldedCubeGraph[n]],100*^9]//Timing;If[ByteCount[res]>1*^5,Put[res,file="~/mma/Graphs/Properties/WienerSumIndex/"<>GraphNameToFileName[g]];Run["/bin/gzip -f "<>file<> " &"];{t,Missing["TooLarge"],N[res],IntegerLength/@Through[{Numerator,Denominator}[res]]ByteCount[res]},{t,res}]}],{n,2,12}];

seq={1,12,(592/7),(9920/21),(3237632/1147),(4195744/279),(42033473536/508635),(20571042594816/48912145),(143876912597762048/66167011295),(44361912024129732608/4171700436141)};

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

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

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Gear

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

(seq=Table[WienerSumIndex[GearGraph[n]],{n,3,30}]);//Timing

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

FindSequenceFunction[Rest@seq,n-3]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Grid m×n

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

Grid n×n

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

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

(seq=Table[WienerSumIndex[System`GridGraph[{n,n}]],{n,15}]);//Timing

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-1]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Grid k×m×n

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

Grid n×n×n

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

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

(seq=Table[WienerSumIndex[System`GridGraph[{n,n,n}]],{n,7}])//Timing

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-1]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

HalvedCube

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

(seq=Table[WienerSumIndex[HalvedCubeGraph[n]],{n,9}])//Timing

Table[Print[{g={"HalvedCube",n},{t,res}=MemoryConstrained[WienerSumIndex[HalvedCubeGraph[n]],100*^9]//Timing;If[ByteCount[res]>1*^5,Put[res,file="~/mma/Graphs/Properties/WienerSumIndex/"<>GraphNameToFileName[g]];Run["/bin/gzip -f "<>file<> " &"];{t,Missing["TooLarge"],N[res],IntegerLength/@Through[{Numerator,Denominator}[res]]ByteCount[res]},{t,res}]}],{n,11}];

seq={0,1,12,(744/7),(2432/3),(228431520/40703),(253056/7),(9481978650144/43117897),(2229262152764424192/1746368698415),(5520625827396307200/774515965531),(90703559267766763520/2353936521549)};

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

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

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Hanoi

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

(seq=Table[WienerSumIndex[HanoiGraph[n]],{n,5}])//Timing

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

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Hypercube

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

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

(seq=Table[WienerSumIndex[HypercubeGraph[n]],{n,8}])//Timing

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

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

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Keller

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

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

(seq=Table[WienerSumIndex[KellerGraph[n]],{n,3}])//Timing

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

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[3;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

King n×n

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

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-1]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Knight m×n

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

Knight n×n

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

seq=Table[GraphData[{"Knight",{n,n}},"WienerSumIndex"],{n,10}]

FindSequenceFunction[Drop[DeleteMissing@seq,3],n-3]//Head//Timing

FindSequenceFunction[Drop[DeleteMissing@seq,4],n-4]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

MengerSponge

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

(seq=Table[WienerSumIndex[MengerSpongeGraph[n]],{n,1}])//Timing

MoebiusLadder

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

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

(seq=Table[WienerSumIndex[MoebiusLadder[n]],{n,3,30}]);//Timing

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

FindSequenceFunction[Rest@seq,n-3]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Mycielski

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

seq=Table[GraphData[{"Mycielski",n},"WienerSumIndex"],{n,10}]

(seq=Table[WienerSumIndex[MycielskiGraph1[n]],{n,8}])//Timing

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-1]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Odd

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

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

(seq=Table[WienerSumIndex[OddGraph1[n]],{n,5}])//Timing

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

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

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Pan

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

(seq=Table[WienerSumIndex[PanGraph[n]],{n,3,40}]);//Timing

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

FindSequenceFunction[Rest@seq,n-3]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Path

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

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

FindSequenceFunction[seq,n]//Factor

PathComplement

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

Do[Print[{k,FindSequenceFunction[Drop[DeleteMissing@seq,k],n-k]//Head//Timing}],{k,3,5}]

PermutationStar

seq=Table[GraphData[{"PermutationStar",n},"WienerSumIndex"],{n,6}]

(seq=Table[WienerSumIndex[PermutationStarGraph[n]],{n,5}])//Timing

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

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

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Prism

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

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

(seq=Table[WienerSumIndex[PrismGraph[n]],{n,3,40}]);//Timing

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

FindSequenceFunction[Rest@seq,n-3]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Queen n×n

seq=Table[GraphData[{"Queen",{n,n}},"WienerSumIndex"],{n,10}]

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-1]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Rook n×n

seq=Table[GraphData[{"Rook",{n,n}},"WienerSumIndex"],{n,10}]

(seq=Table[WienerSumIndex[RookGraph[n,n]],{n,14}])//Timing

FindSequenceFunction[seq,n]//Factor

RookComplement n×n

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

(seq=Table[WienerSumIndex[System`GraphComplement[RookGraph[n,n]]],{n,14}])//Timing

seq={0,Indeterminate,(1053/10),(42048/55),(185000/57),(2081700/203),(4386627/164),(30155776/495),(44509824/355),(233482500/979),(278545025/654),(1230064704/1703),(1272906648/1085),(4987712548/2715),(4661094375/1672),(16725196800/4063),(14475191552/2439),(48548486916/5795),39574447749/3410};

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

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

SierpinskiCarpet

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

(seq=Table[WienerSumIndex[SierpinskiCarpetGraph[n]],{n,2}])//Timing

SierpinskiSieve

seq=Table[GraphData[{"SierpinskiSieve",n},"WienerSumIndex"],{n,5}]

(seq=Table[WienerSumIndex[SierpinskiSieveGraph[n]],{n,5}])//Timing

SierpinskiTetrahedron

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

(seq=Table[WienerSumIndex[SierpinskiTetrahedronGraph[n]],{n,4}])//Timing

StackedBook n×n

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

Do[Print[{k,FindSequenceFunction[Drop[DeleteMissing@seq,k],n-k]//Head//Timing}],{k,3,5}]

Star

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

A000290

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

Table[WienerSumIndex[Star[n]],{n,20}]

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

Star

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

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

FindSequenceFunction[l,n-2]//FullSimplify

Sun

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

(seq=Table[WienerSumIndex[SunGraph[n]],{n,3,30}])//Timing

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

FindSequenceFunction[Rest@seq,n-3]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Sunlet

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

(seq=Table[WienerSumIndex[SunletGraph[n]],{n,3,30}])//Timing

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

FindSequenceFunction[Rest@seq,n-3]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Tetrahedral

seq=Table[GraphData[{"Tetrahedral",n},"WienerSumIndex"],{n,6,10}]

(seq=Table[WienerSumIndex[TetrahedralGraph[n]],{n,6,12}])//Timing

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

FindSequenceFunction[Rest@seq,n-6]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

TorusGrid n×n

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

(seq=Table[WienerSumIndex[TorusGridGraph[n,n]],{n,3,14}])//Timing

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

FindSequenceFunction[Rest@seq,n-3]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

Transposition

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

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

(seq=Table[WienerSumIndex[TranspositionGraph[n]],{n,5}])//Timing

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

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

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Triangular

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

(seq=Table[WienerSumIndex[TriangularGraph[n]],{n,2,21}])//Timing

FindSequenceFunction[seq,n-1]//Factor

TriangularGrid

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

(seq=Table[WienerSumIndex[TriangularGridGraph[n]],{n,17}])//Timing

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-1]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Table[Tally[Flatten[GraphDistanceMatrix[g=TriangularGridGraph[n]]/(IdentityMatrix[VertexCount[g]]+ResistanceMatrix[g])]],{n,5}]//Column

TriangularHoneycombAcuteKnight

TriangularHoneycombBishop

TriangularHoneycombObtuseKnight

TriangularHoneycombQueen

TriangularHoneycombRook

TriangularSnake

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

FindSequenceFunction[seq,n]//Factor

Web

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

(seq=Table[WienerSumIndex[WebGraph[n]],{n,3,30}])//Timing

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

FindSequenceFunction[Rest@seq,n-3]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Wheel

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

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

(seq=Table[WienerSumIndex[WheelGraph[n]],{n,4,40}])/Timing

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

FindSequenceFunction[Rest@seq,n-5]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]//Head//Timing

(tallies=Table[Tally[Flatten[GraphDistanceMatrix[g=WheelGraph[n]]/(IdentityMatrix[VertexCount[g]]+ResistanceMatrix[g])]],{n,4,15}])//Column

FindSequenceFunction[tallies[[All,2,1]]]

WhiteBishop n×n

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

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

FindSequenceFunction[Rest@DeleteMissing@seq,n-2]//Head//Timing

FullSimplify[FindSequenceFunction[seq[[2;;;;2]],n/2-1],n∈Integers&&n>2]

FullSimplify[FindSequenceFunction[seq[[;;;;2]],(n-1)/2],n∈Integers&&n>2]

Checks

With denominator = I + R

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex[GraphData[#]]}&/@GraphData[;;20],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex[GraphData[#]]}&/@GraphData[;;50],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

DeleteCases[{#,GraphData[#,"WienerSumIndex"],WienerSumIndex[GraphData[#]]}&/@GraphData[;;100],{_,x_,x_}|{_,Missing["TooLarge"],_}]//Timing//N

Procedural

WienerSumIndex1[g_System`Graph]:=If[ConnectedGraphQ[g],With[{d=GraphDistanceMatrix[g],r=ResistanceMatrix[g],n=VertexCount[g]},Total[Table[d[[i,j]]/r[[i,j]],{i,n},{j,i-1}],2]],
Indeterminate]

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex1[GraphData[#]]}&/@GraphData[;;20],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex1[GraphData[#]]}&/@GraphData[;;50],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex1[GraphData[#]]}&/@GraphData[;;100],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Procedural with Tally

WienerSumIndex2[g_System`Graph]:=If[ConnectedGraphQ[g],With[{d=GraphDistanceMatrix[g],r=ResistanceMatrix[g],n=VertexCount[g]},Total[Times@@@Tally[Flatten[Table[d[[i,j]]/r[[i,j]],{i,n},{j,i-1}]]]]],
Indeterminate]

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex2[GraphData[#]]}&/@GraphData[;;20],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex2[GraphData[#]]}&/@GraphData[;;50],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex2[GraphData[#]]}&/@GraphData[;;100],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

I+R With Tally

WienerSumIndex3[g_System`Graph]:=If[ConnectedGraphQ[g],Total[#2 #1&@@@Tally[Flatten[GraphDistanceMatrix[g]/(IdentityMatrix[VertexCount[g]]+ResistanceMatrix[g])]]]/2,
Indeterminate]

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex3[GraphData[#]]}&/@GraphData[;;20],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex3[GraphData[#]]}&/@GraphData[;;50],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex3[GraphData[#]]}&/@GraphData[;;100],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

With DeleteDiagonal

DeleteDiagonal[m_]:=Delete[m,Table[{i,i},{i,Length[m]}]]

WienerSumIndex3[g_System`Graph]:=If[ConnectedGraphQ[g],Total[DeleteDiagonal@GraphDistanceMatrix[g]/DeleteDiagonal@ResistanceMatrix[g],2]/2,
Indeterminate]

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex3[GraphData[#]]}&/@GraphData[;;20],{_,x_,x_}|{_,Missing["TooLarge"]}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex3[GraphData[#]]}&/@GraphData[;;50],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex3[GraphData[#]]}&/@GraphData[;;100],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

With Tally+DeleteDiagonal

WienerSumIndex4[g_System`Graph]:=If[ConnectedGraphQ[g],Total[#2 #1&@@@Tally[Flatten[DeleteDiagonal@GraphDistanceMatrix[g]/DeleteDiagonal@ResistanceMatrix[g]]]]/2,
Indeterminate]

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex4[GraphData[#]]}&/@GraphData[;;20],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex4[GraphData[#]]}&/@GraphData[;;50],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing

Monitor[DeleteCases[{g=#,GraphData[#,"WienerSumIndex"],WienerSumIndex4[GraphData[#]]}&/@GraphData[;;100],{_,x_,x_}|{_,Missing["TooLarge"],_}],g]//Timing