You're not too far off; you just need to use nested If functions rather than three successive commands:
armchairhamiltonian[n_, k_] := Table[
If[Mod[u, 2] != 0 && v == (u + 1), -E^(-I*k/2),
If[Mod[u, 2] == 0 && v == (u - 1), -E^(I*k/2),
If[Mod[u + v - 1, 4] == 0 && Abs[u - v] < 4, -1, 0]]],
{u, 2*n}, {v, 2*n}]
armchairhamiltonian[5, 1] // MatrixForm

Also note the following syntax corrections that I made to your code above:
Mathematica uses different commands for setting variables and for testing equality/inequality (= and == respectively.) If you want something that returns True or False for an If statement, you must use == rather than =. Your original code used = in one spot (probably just a typo.)
The underscore character _ is reserved for pattern matching and cannot be used in variable names. If you want to denote word boundaries in your variable names, I recommend camel case (while always starting the first word in lowercase to avoid potential conflict with built-in functions.)
The imaginary unit $i$ is I in Mathematica, not i; and the base of natural logarithms $e$ is E, not e. Given the mathematical expressions you're using, I suspect you mean I and E.
N is a protected symbol; it is the function that returns the numerical value of an expression. (For example, Mathematica treats Pi as an exact number by default; if you want its decimal expansion, use N[Pi] and you'll get 3.14159.) Use n or NN or something like that instead.
Finally, for future reference: it is often easier to construct such matrices using SparseArray. This also can save memory and calculation time if the matrix is large. In particular, the Band structure would be particularly helpful for constructing this matrix.
_representsBlank, a pattern matching construct. It cannot be used in a symbol name. TryarmchairHamiltonian. – Rohit Namjoshi Oct 12 '21 at 16:34Nis a protected symbol. See point 4 – Michael E2 Oct 12 '21 at 16:54$character in place of the_. – CA Trevillian Oct 12 '21 at 19:31