OFFSET
1,2
COMMENTS
A graph G = (V,E) is harmonious if there exists an injective function f_V : V -> {0,1,...,n-1} such that a bijection occurs in the function f_E : E -> {0,...,n-1} after the harmoniously induced edge labels, f_E(v_iv_j) = (f_V(v_i) +f_V(v_j))(mod n), are applied.
A329910 contains the same data for simple graphs.
LINKS
Joseph A. Gallian, A dynamic survey of graph labeling, Elec. J. Combin., (2014), #DS6.
D. Tanna, Harmonious Labeling of Certain Graphs, International Journal of Advanced Engineering Research and Studies, 2 (2013), 46-48.
FORMULA
For n odd, a(n) = ceiling(n/2)^n; for n even, a(n) = ((n^2/4) + (n/2))^(n/2) (conjectured).
EXAMPLE
For n=3, the a(3) = 8 solutions are represented by the following adjacency matrices:
0 1 2 0 1 2 0 1 2 0 1 2
0 [ 1 1 1 ] 0 [ 1 1 0 ] 0 [ 1 0 1 ] 0 [ 1 0 0 ]
1 [ 1 0 0 ] 1 [ 1 1 0 ] 1 [ 0 0 0 ] 1 [ 0 1 0 ]
2 [ 1 0 0 ] 2 [ 0 0 0 ] 2 [ 1 0 1 ] 2 [ 0 0 1 ]
0 1 2 0 1 2 0 1 2 0 1 2
0 [ 0 1 1 ] 0 [ 0 1 0 ] 0 [ 0 0 1 ] 0 [ 0 0 0 ]
1 [ 1 0 1 ] 1 [ 1 1 1 ] 1 [ 0 0 1 ] 1 [ 0 1 1 ]
2 [ 1 1 0 ] 2 [ 0 1 0 ] 2 [ 1 1 1 ] 2 [ 0 1 1 ]
Notice that the number of self-loops in each graph is equal to the sum of the main diagonal.
PROG
(SageMath 9.2)
nlist = []
for n in range(1, 162):
if (n % 2) == 0:
nlist.append(((n^2/4) + (n/2))^(n/2))
else:
nlist.append(ceil(n/2)^n)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Patrick D. Cone, Jan 01 2021
STATUS
approved