Idiosyncratic Polynomial

Author

Eric W. Weisstein
February 9, 2024

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

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

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

Defintions

Website

http://www.math.fau.edu/locke/Graphmat.htm#Idiosyn

The idiosyncratic polynomial is the characteristic polynomial of the matrix that results from replacing all zeroes in the adjacency matrix by some variable, y. (This is a two variable polynomial.)

Factor[CharacteristicPolynomial[ToAdjacencyMatrix[Graph["CoxeterGraph"]]/. 0->y,x]]

van Dam

E.R. van Dam et al. / Linear Algebra and its Applications 423 (2007) 33–41

Factor[IdiosyncraticPolynomial[Graph["CoxeterGraph"],{x,y}]]

Not multiplicative

IdiosyncraticPolynomial[GraphData["P2"],{x,y}]

IdiosyncraticPolynomial[GraphData["2P2"],{x,y}]//Factor

Co-idiosyncratic graphs

l=Monitor[Sort[{GetGraphData[#,"IdiosyncraticPolynomial"][x,y],g=#}&/@GetGraphData[All]],g];//Timing

Length[co=Select[Split[l,First[#1]==First[#2]&],Length[#]>1&]]

ll=Sort[{GetGraphData[#[[1,2]],"V"],#[[1,1]],#[[All,2]]}&/@co];

TableForm[Take[Most[ll],-5],TableDepth->2]

TableForm[Take[ll,30],TableDepth->2]

Parametrized families

<<MathWorld`Graphs`

Andrasfai

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

(coef=FindLinearRecurrence[Take[poly,15]])//Timing

Length@coef

(coef2=Factor[coef])//Timing

init=Take[poly,Length@coef]

Expand[LinearRecurrence[coef2,init,15]-Take[poly,15]]//Union//Timing

Antiprism

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

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

(coef=Factor/@FindLinearRecurrence[Take[poly,10]])//Head//Timing

(coef=Factor/@FindLinearRecurrence[Take[poly,12]])//Head//Timing

(coef=Factor/@FindLinearRecurrence[Take[poly,14]])//Head//Timing

Apollonian

(poly=Table[GraphData[{"Apollonian",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=6}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[DeleteMissing@poly])//Head//Timing

Barbell

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

coef

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

Simplify[SeriesCoefficient[gf,{z,0,n}],n>2]//Factor

Bishop n×n

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

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

BlackBishop n×n

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

Length@DeleteCases[poly,Missing["NotAvailable"]]

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

Book

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

coef

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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&&n∈Integers]//Expand//Factor

Camel n×n

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

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

Centipede

(poly=Table[GraphData[{"Centipede",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

CocktailParty

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

coef

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&&n∈Integers]

Complete

Entity["Graph",{"Complete",n}]["IdiosyncraticPolynomial"][x,y]

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

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

(coef=FindLinearRecurrence[poly])

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

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

CompleteBipartite m×n

Entity["Graph",{"CompleteBipartite",{m,n}}]["IdiosyncraticPolynomial"][x,y]

DeleteCases[Expand@Flatten[Table[{
{m,n},
GraphData[{"CompleteBipartite",{m,n}},"IdiosyncraticPolynomial"][x,y],
(((x+y))^(-2+m+n)) (-m n+(x^2)+(2-m-n) x y+(-1+m) (-1+n) (y^2))
},{n,20},{m,n}],1],{_,x_,y_}/;Expand[x-y]==0||Expand[x+y]==0]

CompleteBipartite n×n

Entity["Graph",{"CompleteBipartite",{n,n}}]["IdiosyncraticPolynomial"][x,y]

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

(coef=FindLinearRecurrence[poly])//Head//Timing

coef

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

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

CompleteTripartite k×m×n

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

CompleteTripartite n×n×n

Entity["Graph",{"CompleteTripartite",{n,n,n}}]["IdiosyncraticPolynomial"][x,y]

(poly=Table[GraphData[{"CompleteTripartite",{n,n,n}},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

coef

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

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

CrossedPrism

(poly=Table[GraphData[{"CrossedPrism",2n},"IdiosyncraticPolynomial"],{n,k0=2,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

Simplify[SeriesCoefficient[gf,{z,0,n}],n>2]

Crown

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

coef

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>2]

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

Simplify[SeriesCoefficient[gf,{z,0,n}],n∈Integers&&n>2]

CubeConnectedCycle

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

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

(coef=FindLinearRecurrence[DeleteMissing@poly])

ToPolynomialRecurrence[p,x,n,coef]

Cycle

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

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

coef

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

soln=RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n];//Timing

Head[soln]

(gf=FindGeneratingFunction[poly,z])//Head//Timing

Simplify[SeriesCoefficient[gf,{z,0,n}],n>2]

FibonacciCube

(poly=DeleteMissing@Factor[Table[GraphData[{"FibonacciCube",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=15}]/.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]

Factor[Take[poly2-poly,kmax-k0-Count[poly,_Missing]+1]]

FullSimplify[poly2-poly]

Fiveleaper n×n

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

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

FoldedCube

(poly=Table[GraphData[{"FoldedCube",n},"IdiosyncraticPolynomial"],{n,k0=2,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[DeleteMissing@poly])//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

Simplify[SeriesCoefficient[gf,{z,0,n}],n∈Integers&&n>2]

Gear

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

...hangs...

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

Simplify[SeriesCoefficient[gf,{z,0,n}],n∈Integers&&n>2]

Giraffe n×n

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

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

Goldberg

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

Position[poly,_Missing]//Flatten

(coef=Factor/@FindLinearRecurrence[Take[poly,8]])//Head//Timing

...hangs...

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

Simplify[SeriesCoefficient[gf,{z,0,n}],n∈Integers&&n>2]

Grid m×n

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

Grid 2×n

(poly=Table[GraphData[{"Grid",Sort[{2,n}]},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

Grid 3×n

(poly=Table[GraphData[{"Grid",Sort[{3,n}]},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

Grid n×n

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

(poly=Table[GraphData[{"Grid",{n,n}},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

HalvedCube

(poly=Table[GraphData[{"HalvedCube",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[DeleteMissing@poly])//Head//Timing

Hanoi

(poly=Table[GraphData[{"Hanoi",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=5}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

Helm

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

Hypercube

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

(poly=Table[GraphData[{"Hypercube",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=FindLinearRecurrence[DeleteMissing@poly])//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

Keller

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

(poly=Table[GraphData[{"Keller",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=5}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

King n×n

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

Length[DeleteMissing@poly]

ByteCount/@DeleteMissing[poly]

FindLinearRecurrence[poly]//Head//Timing

(didn't return after > 3 hours)

FindGeneratingFunction[poly,z]//Head//Timing

Knight m×n

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

Knight n×n

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

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

Ladder

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

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

(coef=FindLinearRecurrence[Take[poly,10]])//Head//Timing

(coef=FindLinearRecurrence[Take[poly,12]])//Head//Timing

(coef=FindLinearRecurrence[Take[poly,15]])//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

Simplify[SeriesCoefficient[gf,{z,0,n}],n>2]

LadderRung

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

coef

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]]

Simplify[SeriesCoefficient[gf,{z,0,n}],n∈Integers&&n>2]

LucasCube

(poly=Table[GraphData[{"LucasCube",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=15}]/.f_Function:>f[x,y])//Column

Length[DeleteMissing@poly]

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

MoebiusLadder

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

(poly=Table[GraphData[{"MoebiusLadder",n},"IdiosyncraticPolynomial"],{n,k0=3,kmax=25}]/.f_Function:>f[x,y]);

more={{{"MoebiusLadder",26},{398.326446`,(((1+x))^3) (-3+x-48 y) (((1-2 x-7 (x^2)+6 (x^3)+5 (x^4)-5 (x^5)+(x^6)-8 y-4 x y+46 (x^2) y+2 (x^3) y-35 (x^4) y+11 (x^5) y+18 (y^2)+54 x (y^2)-66 (x^2) (y^2)-72 (x^3) (y^2)+45 (x^4) (y^2)-6 (y^3)-98 x (y^3)-28 (x^2) (y^3)+84 (x^3) (y^3)-20 (y^4)+35 x (y^4)+70 (x^2) (y^4)+15 (y^5)+21 x (y^5)+(y^6)))^2) (((1+6 x-11 (x^2)-6 (x^3)+15 (x^4)-7 (x^5)+(x^6)-52 x y+26 (x^2) y+78 (x^3) y-65 (x^4) y+13 (x^5) y-26 (y^2)+130 x (y^2)+78 (x^2) (y^2)-208 (x^3) (y^2)+65 (x^4) (y^2)+78 (y^3)-78 x (y^3)-260 (x^2) (y^3)+156 (x^3) (y^3)-78 (y^4)-91 x (y^4)+182 (x^2) (y^4)+13 (y^5)+91 x (y^5)+13 (y^6)))^2) (((1+12 x-38 (x^2)-92 (x^3)+157 (x^4)+220 (x^5)-142 (x^6)-248 (x^7)-25 (x^8)+90 (x^9)+53 (x^10)+12 (x^11)+(x^12)-208 x y+104 (x^2) y+1456 (x^3) y-156 (x^4) y-2392 (x^5) y-884 (x^6) y+1040 (x^7) y+910 (x^8) y+260 (x^9) y+26 (x^10) y-104 (y^2)+1144 x (y^2)+1716 (x^2) (y^2)-6136 (x^3) (y^2)-5434 (x^4) (y^2)+4524 (x^5) (y^2)+5850 (x^6) (y^2)+1560 (x^7) (y^2)-195 (x^8) (y^2)-130 (x^9) (y^2)-13 (x^10) (y^2)+728 (y^3)-2288 x (y^3)-10712 (x^2) (y^3)+7072 (x^3) (y^3)+18408 (x^4) (y^3)+4160 (x^5) (y^3)-4160 (x^6) (y^3)-2080 (x^7) (y^3)-260 (x^8) (y^3)-2210 (y^4)-780 x (y^4)+24050 (x^2) (y^4)+7800 (x^3) (y^4)-17810 (x^4) (y^4)-10400 (x^5) (y^4)-520 (x^6) (y^4)+520 (x^7) (y^4)+65 (x^8) (y^4)+3380 (y^5)+10712 x (y^5)-24180 (x^2) (y^5)-22048 (x^3) (y^5)+3848 (x^4) (y^5)+5616 (x^5) (y^5)+936 (x^6) (y^5)-2158 (y^6)-18772 x (y^6)+9126 (x^2) (y^6)+17264 (x^3) (y^6)+2756 (x^4) (y^6)-936 (x^5) (y^6)-156 (x^6) (y^6)-832 (y^7)+16016 x (y^7)+2184 (x^2) (y^7)-5824 (x^3) (y^7)-1456 (x^4) (y^7)+2522 (y^8)-7462 x (y^8)-3003 (x^2) (y^8)+728 (x^3) (y^8)+182 (x^4) (y^8)-1950 (y^9)+1820 x (y^9)+910 (x^2) (y^9)+767 (y^10)-182 x (y^10)-91 (x^2) (y^10)-156 (y^11)+13 (y^12)))^2)}},{{"MoebiusLadder",27},{558.00717`,(-3+x-50 y) (3+x-2 y) (((x+y))^4) (((-3+3 (x^2)+(x^3)+9 y+6 x y-6 (y^2)-3 x (y^2)+(y^3)))^2) (((3-3 (x^2)+(x^3)-9 y-6 x y+6 (x^2) y+6 (y^2)+9 x (y^2)+(y^3)))^2) (((-3+27 (x^2)+9 (x^3)-54 (x^4)-36 (x^5)+21 (x^6)+27 (x^7)+9 (x^8)+(x^9)+27 y+54 x y-162 (x^2) y-270 (x^3) y+90 (x^4) y+270 (x^5) y+126 (x^6) y+18 (x^7) y-81 (y^2)-351 x (y^2)+81 (x^2) (y^2)+855 (x^3) (y^2)+495 (x^4) (y^2)-27 (x^5) (y^2)-63 (x^6) (y^2)-9 (x^7) (y^2)+72 (y^3)+756 x (y^3)+720 (x^2) (y^3)-480 (x^3) (y^3)-540 (x^4) (y^3)-108 (x^5) (y^3)+81 (y^4)-585 x (y^4)-1080 (x^2) (y^4)-180 (x^3) (y^4)+135 (x^4) (y^4)+27 (x^5) (y^4)-198 (y^5)+36 x (y^5)+540 (x^2) (y^5)+180 (x^3) (y^5)+138 (y^6)+162 x (y^6)-90 (x^2) (y^6)-30 (x^3) (y^6)-36 (y^7)-72 x (y^7)+9 x (y^8)+(y^9)))^2) (((3-27 (x^2)+9 (x^3)+54 (x^4)-36 (x^5)-21 (x^6)+27 (x^7)-9 (x^8)+(x^9)-27 y-54 x y+216 (x^2) y+162 (x^3) y-450 (x^4) y+18 (x^5) y+252 (x^6) y-126 (x^7) y+18 (x^8) y+81 (y^2)+405 x (y^2)-405 (x^2) (y^2)-1305 (x^3) (y^2)+945 (x^4) (y^2)+729 (x^5) (y^2)-693 (x^6) (y^2)+135 (x^7) (y^2)-54 (y^3)-1080 x (y^3)-630 (x^2) (y^3)+3000 (x^3) (y^3)+270 (x^4) (y^3)-1872 (x^5) (y^3)+546 (x^6) (y^3)-189 (y^4)+1035 x (y^4)+2880 (x^2) (y^4)-1980 (x^3) (y^4)-2475 (x^4) (y^4)+1287 (x^5) (y^4)+396 (y^5)+324 x (y^5)-2916 (x^2) (y^5)-1188 (x^3) (y^5)+1782 (x^4) (y^5)-210 (y^6)-1134 x (y^6)+378 (x^2) (y^6)+1386 (x^3) (y^6)-72 (y^7)+432 x (y^7)+540 (x^2) (y^7)+72 (y^8)+81 x (y^8)+(y^9)))^2)}},{{"MoebiusLadder",28},{715.09229`,(1+x) (-3+x-52 y) (((-1+x+2 y))^2) (((-1+2 x+(x^2)+4 y-2 (y^2)))^2) (((1-x-2 (x^2)+(x^3)-4 y-2 x y+5 (x^2) y+3 (y^2)+6 x (y^2)+(y^3)))^2) (((1+3 x-4 (x^2)+(x^3)-14 x y+7 (x^2) y-7 (y^2)+14 x (y^2)+7 (y^3)))^2) (((1-6 x-13 (x^2)+8 (x^3)+8 (x^4)-6 (x^5)+(x^6)-12 y+4 x y+76 (x^2) y+8 (x^3) y-46 (x^4) y+12 (x^5) y+32 (y^2)+68 x (y^2)-102 (x^2) (y^2)-100 (x^3) (y^2)+53 (x^4) (y^2)-20 (y^3)-136 x (y^3)-32 (x^2) (y^3)+104 (x^3) (y^3)-19 (y^4)+52 x (y^4)+86 (x^2) (y^4)+18 (y^5)+24 x (y^5)+(y^6)))^2) (((1-12 x-58 (x^2)+12 (x^3)+211 (x^4)+112 (x^5)-216 (x^6)-224 (x^7)+8 (x^8)+100 (x^9)+54 (x^10)+12 (x^11)+(x^12)-24 y+16 x y+616 (x^2) y+736 (x^3) y-1128 (x^4) y-2080 (x^5) y-272 (x^6) y+1184 (x^7) y+868 (x^8) y+240 (x^9) y+24 (x^10) y+140 (y^2)+536 x (y^2)-1668 (x^2) (y^2)-5200 (x^3) (y^2)-1252 (x^4) (y^2)+5424 (x^5) (y^2)+4824 (x^6) (y^2)+1104 (x^7) (y^2)-222 (x^8) (y^2)-120 (x^9) (y^2)-12 (x^10) (y^2)-288 (y^3)-2720 x (y^3)-752 (x^2) (y^3)+10464 (x^3) (y^3)+11544 (x^4) (y^3)+608 (x^5) (y^3)-3856 (x^6) (y^3)-1696 (x^7) (y^3)-212 (x^8) (y^3)-32 (y^4)+5064 x (y^4)+9164 (x^2) (y^4)-4152 (x^3) (y^4)-13670 (x^4) (y^4)-6392 (x^5) (y^4)-76 (x^6) (y^4)+424 (x^7) (y^4)+53 (x^8) (y^4)+1064 (y^5)-3424 x (y^5)-13488 (x^2) (y^5)-6784 (x^3) (y^5)+4544 (x^4) (y^5)+3744 (x^5) (y^5)+624 (x^6) (y^5)-1812 (y^6)-1072 x (y^6)+7848 (x^2) (y^6)+7552 (x^3) (y^6)+848 (x^4) (y^6)-624 (x^5) (y^6)-104 (x^6) (y^6)+1400 (y^7)+3008 x (y^7)-1248 (x^2) (y^7)-2752 (x^3) (y^7)-688 (x^4) (y^7)-499 (y^8)-1816 x (y^8)-564 (x^2) (y^8)+344 (x^3) (y^8)+86 (x^4) (y^8)+20 (y^9)+480 x (y^9)+240 (x^2) (y^9)+42 (y^10)-48 x (y^10)-24 (x^2) (y^10)-12 (y^11)+(y^12)))^2)}},{{"MoebiusLadder",29},{820.924201`,(-3+x-54 y) (3+x-2 y) (((-1+5 x+35 (x^2)-50 (x^3)-215 (x^4)+79 (x^5)+489 (x^6)+120 (x^7)-429 (x^8)-308 (x^9)+55 (x^10)+142 (x^11)+65 (x^12)+13 (x^13)+(x^14)+19 y+5 x y-570 (x^2) y-310 (x^3) y+2545 (x^4) y+2223 (x^5) y-3072 (x^6) y-4272 (x^7) y-198 (x^8) y+2090 (x^9) y+1342 (x^10) y+354 (x^11) y+39 (x^12) y+(x^13) y-121 (y^2)-600 x (y^2)+2670 (x^2) (y^2)+6640 (x^3) (y^2)-5895 (x^4) (y^2)-18108 (x^5) (y^2)-4200 (x^6) (y^2)+12024 (x^7) (y^2)+9900 (x^8) (y^2)+2530 (x^9) (y^2)-66 (x^10) (y^2)-120 (x^11) (y^2)-13 (x^12) (y^2)+284 (y^3)+3980 x (y^3)-2260 (x^2) (y^3)-27780 (x^3) (y^3)-14460 (x^4) (y^3)+33852 (x^5) (y^3)+36456 (x^6) (y^3)+6360 (x^7) (y^3)-5610 (x^8) (y^3)-2750 (x^9) (y^3)-396 (x^10) (y^3)-12 (x^11) (y^3)+214 (y^4)-11080 x (y^4)-15750 (x^2) (y^4)+41100 (x^3) (y^4)+67620 (x^4) (y^4)+3906 (x^5) (y^4)-34440 (x^6) (y^4)-17580 (x^7) (y^4)-1980 (x^8) (y^4)+385 (x^9) (y^4)+66 (x^10) (y^4)-2644 (y^5)+13644 x (y^5)+49860 (x^2) (y^5)-3444 (x^3) (y^5)-77238 (x^4) (y^5)-45234 (x^5) (y^5)+2940 (x^6) (y^5)+7380 (x^7) (y^5)+1485 (x^8) (y^5)+55 (x^9) (y^5)+6240 (y^6)-1572 x (y^6)-59892 (x^2) (y^6)-48048 (x^3) (y^6)+26670 (x^4) (y^6)+33096 (x^5) (y^6)+7140 (x^6) (y^6)-480 (x^7) (y^6)-165 (x^8) (y^6)-7356 (y^7)-15540 x (y^7)+30744 (x^2) (y^7)+49560 (x^3) (y^7)+8400 (x^4) (y^7)-8064 (x^5) (y^7)-2520 (x^6) (y^7)-120 (x^7) (y^7)+4494 (y^8)+19341 x (y^8)-630 (x^2) (y^8)-20580 (x^3) (y^8)-8190 (x^4) (y^8)+126 (x^5) (y^8)+210 (x^6) (y^8)-847 (y^9)-10885 x (y^9)-6580 (x^2) (y^9)+3220 (x^3) (y^9)+1890 (x^4) (y^9)+126 (x^5) (y^9)-665 (y^10)+3038 x (y^10)+2940 (x^2) (y^10)+112 (x^3) (y^10)-126 (x^4) (y^10)+518 (y^11)-294 x (y^11)-504 (x^2) (y^11)-56 (x^3) (y^11)-154 (y^12)-35 x (y^12)+28 (x^2) (y^12)+21 (y^13)+7 x (y^13)-(y^14)))^2) (((-1-5 x+35 (x^2)+50 (x^3)-215 (x^4)-79 (x^5)+489 (x^6)-120 (x^7)-429 (x^8)+308 (x^9)+55 (x^10)-142 (x^11)+65 (x^12)-13 (x^13)+(x^14)+9 y+135 x y-270 (x^2) y-1410 (x^3) y+1755 (x^4) y+3645 (x^5) y-4752 (x^6) y-2592 (x^7) y+5346 (x^8) y-990 (x^9) y-1782 (x^10) y+1206 (x^11) y-299 (x^12) y+27 (x^13) y+9 (y^2)-1080 x (y^2)-630 (x^2) (y^2)+10560 (x^3) (y^2)+1215 (x^4) (y^2)-28836 (x^5) (y^2)+7560 (x^6) (y^2)+29160 (x^7) (y^2)-17820 (x^8) (y^2)-6930 (x^9) (y^2)+9306 (x^10) (y^2)-3000 (x^11) (y^2)+325 (x^12) (y^2)-396 (y^3)+3540 x (y^3)+12660 (x^2) (y^3)-30060 (x^3) (y^3)-51300 (x^4) (y^3)+82404 (x^5) (y^3)+52920 (x^6) (y^3)-96120 (x^7) (y^3)+2970 (x^8) (y^3)+37950 (x^9) (y^3)-17204 (x^10) (y^3)+2300 (x^11) (y^3)+1974 (y^4)-2520 x (y^4)-51030 (x^2) (y^4)+8820 (x^3) (y^4)+192780 (x^4) (y^4)-44226 (x^5) (y^4)-234360 (x^6) (y^4)+102060 (x^7) (y^4)+83160 (x^8) (y^4)-61985 (x^9) (y^4)+10626 (x^10) (y^4)-4452 (y^5)-15876 x (y^5)+86940 (x^2) (y^5)+141876 (x^3) (y^5)-275562 (x^4) (y^5)-237006 (x^5) (y^5)+330372 (x^6) (y^5)+71820 (x^7) (y^5)-144837 (x^8) (y^5)+33649 (x^9) (y^5)+4032 (y^6)+50148 x (y^6)-30492 (x^2) (y^6)-325584 (x^3) (y^6)+32130 (x^4) (y^6)+488376 (x^5) (y^6)-81396 (x^6) (y^6)-217056 (x^7) (y^6)+74613 (x^8) (y^6)+2556 (y^7)-58860 x (y^7)-113400 (x^2) (y^7)+250920 (x^3) (y^7)+330480 (x^4) (y^7)-279072 (x^5) (y^7)-193800 (x^6) (y^7)+116280 (x^7) (y^7)-9594 (y^8)+15795 x (y^8)+164970 (x^2) (y^8)+39780 (x^3) (y^8)-298350 (x^4) (y^8)-75582 (x^5) (y^8)+125970 (x^6) (y^8)+8151 (y^9)+27885 x (y^9)-60060 (x^2) (y^9)-145860 (x^3) (y^9)+24310 (x^4) (y^9)+92378 (x^5) (y^9)-1287 (y^10)-23166 x (y^10)-25740 (x^2) (y^10)+38896 (x^3) (y^10)+43758 (x^4) (y^10)-1638 (y^11)+1638 x (y^11)+15288 (x^2) (y^11)+12376 (x^3) (y^11)+546 (y^12)+2275 x (y^12)+1820 (x^2) (y^12)+91 (y^13)+105 x (y^13)+(y^14)))^2)}},{{"MoebiusLadder",30},{909.507734`,(((1+x))^3) (-3+x-56 y) (((x+y))^2) (((-2+x+3 y))^2) (((-2+2 x+(x^2)+6 y-3 (y^2)))^2) (((-1-x+(x^2)+y+3 x y+(y^2)))^2) (((1-3 x+(x^2)-5 y+5 x y+5 (y^2)))^2) (((1+3 x-(x^2)-3 (x^3)+(x^4)-y-11 x y-7 (x^2) y+7 (x^3) y-4 (y^2)+4 x (y^2)+14 (x^2) (y^2)+4 (y^3)+8 x (y^3)+(y^4)))^2) (((-5+5 x+5 (x^2)-5 (x^3)+(x^4)+25 y-5 x y-25 (x^2) y+9 (x^3) y-40 (y^2)-20 x (y^2)+26 (x^2) (y^2)+20 (y^3)+24 x (y^3)+(y^4)))^2) (((1-6 x+(x^2)+4 (x^3)+(x^4)-10 y+20 x y+10 (x^2) y+25 (y^2)-10 x (y^2)-5 (x^2) (y^2)-20 (y^3)+5 (y^4)))^2) (((1+6 x-(x^2)-28 (x^3)-21 (x^4)+14 (x^5)+21 (x^6)+8 (x^7)+(x^8)-2 y-44 x y-78 (x^2) y+56 (x^3) y+154 (x^4) y+84 (x^5) y+14 (x^6) y-15 (y^2)+54 x (y^2)+279 (x^2) (y^2)+196 (x^3) (y^2)-21 (x^4) (y^2)-42 (x^5) (y^2)-7 (x^6) (y^2)+48 (y^3)+96 x (y^3)-176 (x^2) (y^3)-224 (x^3) (y^3)-56 (x^4) (y^3)-36 (y^4)-184 x (y^4)-36 (x^2) (y^4)+56 (x^3) (y^4)+14 (x^4) (y^4)-8 (y^5)+96 x (y^5)+48 (x^2) (y^5)+20 (y^6)-16 x (y^6)-8 (x^2) (y^6)-8 (y^7)+(y^8)))^2)}}}[[All,-1,-1]];

Column[Short/@(extendedpoly=Join[poly,more]),Dividers->All]

Length[extendedpoly]

extendedpoly/.{x->1,y->1}

(coef=Factor/@FindLinearRecurrence[Take[poly,8]])//Head//Timing

(coef=Factor/@FindLinearRecurrence[Take[poly,10]])//Head//Timing

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

(coef=Factor/@FindLinearRecurrence[extendedpoly])//Head//Timing

(gf=FindGeneratingFunction[poly,x])//Head//Timing

ran for 5+ hours

Mycielski

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

(poly=Table[GraphData[{"Mycielski",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=11}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[DeleteMissing@poly])//Head//Timing

Odd

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

(poly=Table[GraphData[{"Odd",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=7}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

Pan

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

(coef=Factor/@FindLinearRecurrence[Take[poly,8]])//Head//Timing

(coef=Factor/@FindLinearRecurrence[Take[poly,10]])//Head//Timing

(coef=Factor/@FindLinearRecurrence[Take[poly,12]])//Head//Timing

Path

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

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

coef

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

Simplify[SeriesCoefficient[gf,{z,0,n}],n>2]

Pell

(poly=Table[GraphData[{"Pell",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=9}]/.f_Function:>f[x,y])//Column

Length[DeleteMissing@poly]

rules={5->};

Length[DeleteMissing[poly=ReplacePart[poly,rules]]]

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

PermutationStar

(poly=Table[GraphData[{"PermutationStar",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=6}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[DeleteMissing@poly])//Head//Timing

Prism

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

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

(coef=Factor/@FindLinearRecurrence[Take[poly,8]])//Head//Timing

(coef=Factor/@FindLinearRecurrence[Take[poly,10]])//Head//Timing

(coef=Factor/@FindLinearRecurrence[Take[poly,12]])//Head//Timing

(coef=Factor/@FindLinearRecurrence[Take[poly,15]])//Head//Timing

Queen n×n

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

Length[DeleteMissing@poly]

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

Rook n×n

(poly=Table[GraphData[{"Rook",{n,n}},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

Simplify[SeriesCoefficient[gf,{z,0,n}],n∈Integers&&n>2]

poly-Table[(((-1))^n)(x-(((n-1))^2)y-2(n-1))(((x-y+2))^(((n-1))^2))(((x+(n-1)y-n+2))^(2n-2)),{n,10}]//Expand

RookComplement n×n

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

Table[(x-2(n-1)y-(((n-1))^2))((((n-1)+x-(n-2)y))^(2(n-1)))(((2y+x-1))^(((n-1))^2)),{n,20}]==poly

FindLinearRecurrence[Rest@DeleteMissing@poly]//Head//Timing

...hangs...

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

SierpinskiCarpet

(poly=Table[GraphData[{"SierpinskiCarpet",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=4}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[DeleteMissing@poly])

SierpinskiSieve

(poly=Table[GraphData[{"SierpinskiSieve",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=5}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

SierpinskiTetrahedron

(poly=Table[GraphData[{"SierpinskiTetrahedron",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=6}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[DeleteMissing@poly])//Head//Timing

Star

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

(((-x-y))^(-2+n)) (1+(x^2)+2 x y-n (1+x y))

Table[(((x+y))^(n-2)) (1+(x^2)+2 x y-n (1+x y)),{n,25}]//Factor//Column

(poly=Table[GraphData[{"Star",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=25}]/.f_Function:>f[x,y])//Column

(coef=FindLinearRecurrence[poly])//Head//Timing

coef

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

Simplify[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]]

Simplify[SeriesCoefficient[gf,{z,0,n}],n>2]

Sun

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

Sunlet

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

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

Tetrahedral

(poly=Table[GraphData[{"Tetrahedral",n},"IdiosyncraticPolynomial"],{n,k0=6,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[poly])//Head//Timing

n(n+4)(n+5)/6/.n->n-5

Table[(1/6) (-5+n) (-1+n) n,{n,6,9}]

r=Factor/@FindLinearRecurrence[p]

poly//Column//TraditionalForm

Table[(((x+2(n-4)y-(2n-9)))^(n-1))(((x+(n-6)y-(n-7)))^(n(n-3)/2))(((x-2y+3))^(n(n-1)(n-5)/6))(x-(1/6) (-4+n) (-3+n) (4+n)y-3n+9),{n,6,10}]//Column//TraditionalForm

TorusGrid n×n

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

2+Length[DeleteMissing@poly]

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

Triangular

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

TriangularGrid

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

Length@DeleteCases[poly,Missing["NotAvailable"]]-1

FindLinearRecurrence[Rest@DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

TriangularHoneycombAcuteKnight

(poly=Table[GraphData[{"TriangularHoneycombAcuteKnight",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[DeleteMissing@poly])//Head//Timing

TriangularHoneycombBishop

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

Length@DeleteCases[poly,Missing["NotAvailable"]]

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

TriangularHoneycombObtuseKnight

(poly=Table[GraphData[{"TriangularHoneycombObtuseKnight",n},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y])//Column

(coef=Factor/@FindLinearRecurrence[DeleteMissing@poly])//Head//Timing

TriangularHoneycombQueen

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

Length@DeleteCases[poly,Missing["NotAvailable"]]

(poly2=Table[(((((1+x))^3)(x-2(n-1)-Binomial[n-1,2]y)(((3+x-2y))^(Binomial[n-2,2]))(((2+x-y))^3)(((x+y))^3)Product[(((-k+x+(k+1)y))^3),{k,n-3}])/1),{n,15}]//Expand//Factor)//Column

Table[((poly2[[n]])/(poly[[n]])),{n,8,15}]//Column

FindLinearRecurrence[Rest@DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

TriangularHoneycombRook

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

Length[DeleteMissing@poly]

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

Web

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

(coef=Factor/@FindLinearRecurrence[Take[poly,10]])//Head//Timing

(coef=Factor/@FindLinearRecurrence[Take[poly,12]])//Head//Timing

Wheel

Entity["Graph",{"Wheel",n}]["IdiosyncraticPolynomial"][x,y]

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

<<MathWorld`Polynomial`

coef=Factor/@FindLinearRecurrence[poly]

Length[coef]

ToPolynomialRecurrence[p,x,n,coef]

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

TeXForm[%]

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

(soln=RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n])//Timing

FullSimplify[soln]//Timing

-(((2^(-1-n)) (2+x-y) (-1+n+n x y-x (-2+x+4 y)) (-(2^(2+n)) (((-1+y))^n) (Sqrt[(2+x-y) (-2+x+3 y)])+(2^(2+n)) (((-1+y))^n) y (Sqrt[(2+x-y) (-2+x+3 y)])+(-2-x+y) (-2+x+3 y) (((-x-y-(Sqrt[(2+x-y) (-2+x+3 y)])))^n)+x (Sqrt[(2+x-y) (-2+x+3 y)]) (((-x-y-(Sqrt[(2+x-y) (-2+x+3 y)])))^n)+y (Sqrt[(2+x-y) (-2+x+3 y)]) (((-x-y-(Sqrt[(2+x-y) (-2+x+3 y)])))^n)+(2+x-y) (-2+x+3 y) (((-x-y+(Sqrt[(2+x-y) (-2+x+3 y)])))^n)+x (Sqrt[(2+x-y) (-2+x+3 y)]) (((-x-y+(Sqrt[(2+x-y) (-2+x+3 y)])))^n)+y (Sqrt[(2+x-y) (-2+x+3 y)]) (((-x-y+(Sqrt[(2+x-y) (-2+x+3 y)])))^n)))/((((-1+y))^2) ((((2+x-y) (-2+x+3 y)))^(3/2))))/.{(Sqrt[(2+x-y) (-2+x+3 y)])->a}//FullSimplify

(((2^(-1-n)) (2+x-y) ((2^(2+n)) a (((-1+y))^(1+n))+a ((((-a-x-y))^n)+(((a-x-y))^n)) (x+y)-((((-a-x-y))^n)-(((a-x-y))^n))(a^2)) ((((-1+x))^2)+4 x y-n (1+x y)))/((((-1+y))^2) (a^3)))//FullSimplify

poly2=Table[(((2^(-1-n)) (2+x-y) (a (-(((-a-x-y))^n)+(((a-x-y))^n))+(2^(2+n)) (((-1+y))^(1+n))+((((-a-x-y))^n)+(((a-x-y))^n)) (x+y)) ((((-1+x))^2)+4 x y-n (1+x y)))/((a^2) (((-1+y))^2)))/.a->(Sqrt[(2+x-y) (-2+x+3 y)]),{n,4,20}]//Expand//Factor;

poly2=Table[ ((2^(2+n)) (((-1+y))^(1+n))+a (-(((-a-x-y))^n)+(((a-x-y))^n))+((((-a-x-y))^n)+(((a-x-y))^n)) (x+y))(( (2^(-1-n)) (2+x-y)((((-1+x))^2)+4 x y-n (1+x y)))/((a^2) (((-1+y))^2)))/.a->(Sqrt[(2+x-y) (-2+x+3 y)]),{n,4,20}]//Expand//Factor;

poly2=Table[ ((2^(2+n)) (((-1+y))^(1+n))+ (-a(((-a-x-y))^n)+a(((a-x-y))^n))+((x+y)(((-a-x-y))^n)+(x+y)(((a-x-y))^n)) )(( (2^(-1-n)) (2+x-y)((((-1+x))^2)+4 x y-n (1+x y)))/((a^2) (((-1+y))^2)))/.a->(Sqrt[(2+x-y) (-2+x+3 y)]),{n,4,20}]//Expand//Factor;

poly2=Table[ ((2^(2+n)) (((-1+y))^(1+n))- (a-x-y)(((-a-x-y))^n)+(a+x+y)(((a-x-y))^n))(( (2^(-1-n)) (2+x-y)((((-1+x))^2)+4 x y-n (1+x y)))/((a^2) (((-1+y))^2)))/.a->(Sqrt[(2+x-y) (-2+x+3 y)]),{n,4,20}]//Expand//Factor;

poly2=Table[ (a-x-y)(a+x+y)((((2^(2+n)) (((-1+y))^(1+n)))/( (a-x-y)(a+x+y)))- ((((-a-x-y))^n)/((a+x+y)))+((((a-x-y))^n)/((a-x-y))))(( (2^(-1-n)) (2+x-y)((((-1+x))^2)+4 x y-n (1+x y)))/((a^2) (((-1+y))^2)))/.a->(Sqrt[(2+x-y) (-2+x+3 y)]),{n,4,20}]//Expand//Factor;

poly2=Table[ (a-x-y)(a+x+y)((((2^(2+n)) (((-1+y))^(1+n)))/( (a-x-y)(a+x+y)))- (((-1))^n)(((a+x+y))^(n-1))+(((a-x-y))^(n-1)))(( (2^(-1-n)) (2+x-y)((((-1+x))^2)+4 x y-n (1+x y)))/((a^2) (((-1+y))^2)))/.a->(Sqrt[(2+x-y) (-2+x+3 y)]),{n,4,20}]//Expand//Factor;

Take[poly-poly2,6]//FullSimplify

FullSimplify[ (a-x-y)(a+x+y)/.a->(Sqrt[(2+x-y) (-2+x+3 y)])]

poly2=Table[ ((2^(2+n)) (((-1+y))^(1+n))+-4 (((-1+y))^2) ((((-1))^(n-1))(((a+x+y))^(n-1))+(((a-x-y))^(n-1))))(( (2^(-1-n)) (2+x-y)((((-1+x))^2)+4 x y-n (1+x y)))/((a^2) (((-1+y))^2)))/.a->(Sqrt[(2+x-y) (-2+x+3 y)]),{n,4,20}]//Expand//Factor;

poly2=Table[(2 (((y-1))^(n-1))-((((((-1))^(n-1))(((a+x+y))^(n-1))+(((a-x-y))^(n-1))))/(2^(n-1))))(( ((((-1+x))^2)+4 x y-n (1+x y)))/((-2+x+3 y)))/.a->(Sqrt[(2+x-y) (-2+x+3 y)]),{n,4,20}]//Expand//Factor;

Take[poly-poly2,5]//FullSimplify

FindGeneratingFunction[poly,z]//Head//Timing

Simplify[SeriesCoefficient[gf,{z,0,n}],n>2]

WhiteBishop n×n

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

Length@DeleteCases[poly,Missing["NotAvailable"]]+1

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing

Zebra n×n

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

Length[DeleteMissing@poly]

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

FindGeneratingFunction[DeleteMissing@poly,z]//Head//Timing