I'm currently working in the following graph theory excercise:
Prove that if a graph of order $3n (n ≥ 1)$ has $n$ vertices of each of the degrees $n − 1$, $n$ and $n + 1$, then n is even.
So by lemma ($m$ order of the graph):
$$\sum_{v \in V(G)} deg(v) = 2m$$
I'm doing:
$$(n-1)+n+(n+1) = 2(3n)$$
Reaching
$$3n = 2(3n)$$
I feel I'm missing something cause the conclusion is not so clear for me, any hint or help will be really appreciated.
No, you have $$n\cdot (n-1)+n\cdot n+n\cdot (n+1) = 2m$$
so $$3n^2 =2m \implies 2\mid 3n^2 \implies 2\mid n^2 \implies 2\mid n$$