numsplit is the function which allows a procedure which needs to pick numbers from sets of un-pre-determined size to become an enumeration. It can be altered to change the distribution within the enumeration, as long as it is an enumeration of pairs {a,b} where a is constrained to lie within 1 and n.
numsplit[a_,n_]:={Mod[a,n,1],Quotient[a,n]}
assgr::usage="assgr[ic,n] is the n-th graph after ic. The graphs are pair lists, starting from node 1.";
assgr[ic_,aa_]:=Module[{ans=ic,hairs,a=aa,new,poss,k,newcon,baseno},new=Max[ans];hairs=Sort[Fold[DeleteCases[#1,#2,{1},1]&,Join[Range[new],Range[new],Range[new]],Flatten[ans]]];While[a≠0,new++;poss=Union[hairs];{k,a}=numsplit[a,If[Length[poss]3,2,Min[3,Length[poss]]]];newcon=poss[[Rest[FoldList[Module[{dum},{dum,a}=numsplit[a,#2-#1];dum+#1]&,0,Length[poss]+Range[-k+1,0]]]]];hairs=Join[Fold[DeleteCases[#1,#2,{1},1]&,hairs,newcon],Table[new,{3-k}]];ans=Join[ans,{#,new}&/@newcon]];ans]
grls[aa_,ls_List]:=Module[{ans,hairs,a=aa,new,poss,k,newcon,baseno},{baseno,a}=numsplit[a,Length[ls]];ans=ls[[baseno]];new=Max[ans];hairs=Sort[Fold[DeleteCases[#1,#2,{1},1]&,Join[Range[new],Range[new],Range[new]],Flatten[ans]]];While[a≠0,new++;poss=Union[hairs];{k,a}=numsplit[a,If[Length[poss]3,2,Min[3,Length[poss]]]];newcon=poss[[Rest[FoldList[Module[{dum},{dum,a}=numsplit[a,#2-#1];dum+#1]&,0,Length[poss]+Range[-k+1,0]]]]];hairs=Join[Fold[DeleteCases[#1,#2,{1},1]&,hairs,newcon],Table[new,{3-k}]];ans=Join[ans,{#,new}&/@newcon]];ans]
canned::usage="canned[k,n] is the k-th graph after the line 1,2,...,n. Other nodes can attach to these nodes, but at most once. For use with strongiso to find lists of graphs to append to n-haired graphs, to make initial conditions easier to compute by reducing redundant graphs.";
canned[aa_Integer,n_Integer]:=Module[{ans,hairs,a=aa,new,poss,k,newcon},ans=Partition[Range[n],2,1];new=n;hairs=Range[n];While[a≠0,new++;poss=Union[hairs];{k,a}=numsplit[a,If[Length[poss]3,2,Min[3,Length[poss]]]];newcon=poss[[Rest[FoldList[Module[{dum},{dum,a}=numsplit[a,#2-#1];dum+#1]&,0,Length[poss]+Range[-k+1,0]]]]];hairs=Join[Fold[DeleteCases[#1,#2,{1},1]&,hairs,newcon],Table[new,{3-k}]];ans=Join[ans,{#,new}&/@newcon]];ans]
gr[aa_]:=Module[{ans={},hairs={1,1,1},a=aa,new=1,poss,k,newcon},While[a≠0,new++;poss=Union[hairs];{k,a}=numsplit[a,If[Length[poss]3,2,Min[3,Length[poss]]]];newcon=poss[[Rest[FoldList[Module[{dum},{dum,a}=numsplit[a,#2-#1];dum+#1]&,0,Length[poss]+Range[-k+1,0]]]]];hairs=Join[Fold[DeleteCases[#1,#2,{1},1]&,hairs,newcon],Table[new,{3-k}]];ans=Join[ans,{#,new}&/@newcon]];ans]
tri4=Union[Select[Table[gr[i],{i,150}],Max[#]4&],SameTest(IsomorphicQ[FromUnorderedPairs[#1],FromUnorderedPairs[#2]]&)];
Length[tri4]
5
gr4[aa_]:=Module[{ans,hairs,a=aa,new,poss,k,newcon,baseno},{baseno,a}=numsplit[a,5];ans=tri4[[baseno]];new=Max[ans];hairs=Sort[Fold[DeleteCases[#1,#2,{1},1]&,Join[Range[new],Range[new],Range[new]],Flatten[ans]]];While[a≠0,new++;poss=Union[hairs];{k,a}=numsplit[a,If[Length[poss]3,2,Min[3,Length[poss]]]];newcon=poss[[Rest[FoldList[Module[{dum},{dum,a}=numsplit[a,#2-#1];dum+#1]&,0,Length[poss]+Range[-k+1,0]]]]];hairs=Join[Fold[DeleteCases[#1,#2,{1},1]&,hairs,newcon],Table[new,{3-k}]];ans=Join[ans,{#,new}&/@newcon]];ans]
Min[Max/@Table[gr4[i],{i,500,5000}]]
6
Min[Max/@Table[gr4[i],{i,150,500}]]
6
Min[Max/@Table[gr4[i],{i,5,150}]]
5
tri5=Union[Select[Table[gr4[i],{i,150}],Max[#]5&],SameTest(IsomorphicQ[FromUnorderedPairs[#1],FromUnorderedPairs[#2]]&)];
Length[tri5]
10
gr5[aa_]:=Module[{ans,hairs,a=aa,new,poss,k,newcon,baseno},{baseno,a}=numsplit[a,10];ans=tri5[[baseno]];new=Max[ans];hairs=Sort[Fold[DeleteCases[#1,#2,{1},1]&,Join[Range[new],Range[new],Range[new]],Flatten[ans]]];While[a≠0,new++;poss=Union[hairs];{k,a}=numsplit[a,If[Length[poss]3,2,Min[3,Length[poss]]]];newcon=poss[[Rest[FoldList[Module[{dum},{dum,a}=numsplit[a,#2-#1];dum+#1]&,0,Length[poss]+Range[-k+1,0]]]]];hairs=Join[Fold[DeleteCases[#1,#2,{1},1]&,hairs,newcon],Table[new,{3-k}]];ans=Join[ans,{#,new}&/@newcon]];ans]
Min[Max/@Table[gr5[i],{i,500,5000}]]
6
Min[Max/@Table[gr5[i],{i,3000,5000}]]
7
Min[Max/@Table[gr5[i],{i,5000,15000}]]
7
tri6=Union[Select[Table[gr5[i],{i,3000}],Max[#]6&],SameTest(IsomorphicQ[FromUnorderedPairs[#1],FromUnorderedPairs[#2]]&)];
Length[tri6]
27
gr6[aa_]:=Module[{ans,hairs,a=aa,new,poss,k,newcon,baseno},{baseno,a}=numsplit[a,27];ans=tri6[[baseno]];new=Max[ans];hairs=Sort[Fold[DeleteCases[#1,#2,{1},1]&,Join[Range[new],Range[new],Range[new]],Flatten[ans]]];While[a≠0,new++;poss=Union[hairs];{k,a}=numsplit[a,If[Length[poss]3,2,Min[3,Length[poss]]]];newcon=poss[[Rest[FoldList[Module[{dum},{dum,a}=numsplit[a,#2-#1];dum+#1]&,0,Length[poss]+Range[-k+1,0]]]]];hairs=Join[Fold[DeleteCases[#1,#2,{1},1]&,hairs,newcon],Table[new,{3-k}]];ans=Join[ans,{#,new}&/@newcon]];ans]