A327904 Number of labeled simple graphs with vertices {1..n} such that every edge has a different sum.
1, 1, 2, 8, 48, 432, 5184, 82944, 1658880, 41472000, 1244160000, 44789760000, 1881169920000, 92177326080000, 5161930260480000, 330363536670720000, 23786174640291840000, 1926680145863639040000, 173401213127727513600000, 17340121312772751360000000
Offset: 0
Keywords
Examples
The graph with edge-set {{1,2},{1,3},{1,4},{2,3}}, which looks like a triangle with a tail, has edges {1,4} and {2,3} with equal sum, so is not counted under a(4).
Links
Crossrefs
Programs
-
Maple
a:= proc(n) option remember; `if`(n=0, 1, a(n-1)*ceil(n/2)*ceil(n/2+1/4)) end: seq(a(n), n=0..20); # Alois P. Heinz, Oct 03 2019
-
Mathematica
stableSets[u_,Q_]:=If[Length[u]==0,{{}},With[{w=First[u]},Join[stableSets[DeleteCases[u,w],Q],Prepend[#,w]&/@stableSets[DeleteCases[u,r_/;r==w||Q[r,w]||Q[w,r]],Q]]]]; qes[n_]:=stableSets[Subsets[Range[n],{2}],Total[#1]==Total[#2]&]; Table[Length[qes[n]],{n,0,5}]
-
PARI
a(n) = {prod(k=1, 2*n+1, ceil(k/4))} \\ Andrew Howroyd, Oct 02 2019
Formula
a(n) = Product_{k=1..2*n+1} ceiling(k/4). - Andrew Howroyd, Oct 02 2019
Extensions
Terms a(8) and beyond from Andrew Howroyd, Oct 02 2019