Find the coefficient of $\sqrt{3}$ in $(1+\sqrt{3})^7$?
Hint: You also get $\sqrt{3}$ terms from $r=3$, $5$, and $7$.
Remark: The following sort of uses the Binomial Theorem, but is not the intended solution. Imagine expanding $(1+\sqrt{3})^7$. Now imagine expanding $(1-\sqrt{3})^7$. Look at $$(1+\sqrt{3})^7-(1-\sqrt{3})^7.$$ If you think about the expansions, the terms that involve even powers of $\sqrt{3}$ cancel, and the ones that involve odd powers get doubled. It follows that our coefficient, which is an integer, is equal to $$\frac{(1+\sqrt{3})^7-(1-\sqrt{3})^7}{2\sqrt{3}}.$$ Divide in the calculator. To calculator accuracy, we get $328$. Since the answer is an integer, it must be $328$.
You don't want only the $r=1$ term. If $r=3$ you get $$\sqrt{3}^3=\underbrace{\sqrt{3}\sqrt{3}}\sqrt{3} = 3\sqrt{3}$$ and similarly for the other terms with odd exponents.
Let $\rm\:w = 1+\sqrt{3}.\:$ $\rm\:w^n$ has $\sqrt{3}\:$ coefficient $\rm\,b_n$ satisfying $\rm\:b_{n+2} = \color{#C00}2\:b_{n+1} + \color{#0A0}2\:b_n\:$ since $\rm\,w\,$ is a root of $\rm\:x^2 = \color{#C00}2\,x + \color{#0A0}2.\:$ Hence $\rm\,\ b_n = 0,\ 1,\ 2,\ 6,\ 16,\ 44,\ 120,\ 328,\,\ldots$ so $328$ is the answer. Details below.
Let $\rm\: w = 1\!+\!\sqrt{3},\:$ with conjugate $\rm\: \bar w = 1\!-\!\sqrt{3}.\:$ For $\rm\:v = a\!+\!b\,\sqrt{3}\:$ we get its $\sqrt{3}$ coefficient by $$\rm\: b\ =\ \frac{v - \bar v}{2\sqrt{3}}\ =\ \frac{v - \bar v}{w -\bar w}\:$$
For $\rm\:v = w^n\:$ these coefficients $\rm\:b_n\:$ satisfy a recurrence based on the minimal polynomial of $\rm\:w\:$
$$\rm w^{n+2} - \bar w^{n+2}\, = \ (\color{#C00}{w + \bar w})\ (w^{n+1} - \bar w^{n+1})\ \color{#0A0}{-\ w\bar w}\ (w^{n} - \bar w^{n})$$
$\rm Dividing\ by\, \ \ w-\bar w\, \ \ yields \ \ \ b_{n+2}\ =\ \color{#C00}2\ b_{n+1} + \color{#0A0}2\ b_n,\ \ \ b_0 = 0,\ b_1 = 1\ \ for\ \ b_n = \dfrac{w^n - \bar w^n}{w - \bar w}$
See this answer for a simple operator-theoretic generalization of the above.
Remark $\ $ Sequeneces of the form $\rm\:\dfrac{w^n - \bar w^n}{w - \bar w}\:$ for $\rm\:w\:$ a quadratic algebraic number are known as Lucas sequences. Many special cases are well-known, e.g. the sequences of Fibonacci, Lucas, Pell, Jacobsthal, and Mersenne. These sequences arise when studying the arithmetic of quadratic number fields. The above recurrence is but one of many identities know for these and related sequences. See any of Paulo Ribenboim's "Number Records" books for many of their properties.
Note that if you express the recurrence in system (matrix) form, then you obtain a fast linear time algorithm for computing the coefficients, by repeatedly squaring matrices, just like the well-known Fibonacci case using their addition formula.