I am trying to model the variance of a time series $Y_n$ which is the sum of $n$ observations of $X_i$. I've reviewed the other answers on CrossValidated; however, I haven't been able to apply those solutions to this problem where I have known distributions of $X_i$ and known $\rho_k$ values. This is the closest answer but doesn't account for $\rho_k \neq 0$ with $k>1$: Variance of average of $n$ correlated random variables.
$$Y_n = \sum_{i=1}^{n} X_i$$
We can assume that $X_i \sim N(\mu,\sigma^2)$ and that they have some autocorrelation such that
$$Cor(X_{i+1},X_{i})=\rho_1\\ Cor(X_{i+2},X_{i})=\rho_2\\ \vdots\\ Cor(X_{i+k},X_{i})=\rho_k$$
Traditionally, if $X_i$ are uncorrelated, the variance of $Y_n$ is simple:
$$Var(Y_n) = n\sigma^2$$
However, because they are correlated... it's make the $Y_n$ calculation more clumsy. I have derived a solution for a few cases (small $n$) where $\rho_k=0$ for $k>2$ below:
\begin{aligned} Var(Y_5) &= Var(X_1+X_2+X_3+X_4+X_5)\\ \\ Var(Y_5) &= 5\sigma^2 + 2Cov(X_2,X_1) + 2Cov(X_3,X_2) + 2Cov(X_3,X_1) + 2Cov(X_4,X_2) + 2Cov(X_4,X_3) + 2Cov(X_5,X_4) + 2Cov(X_5,X_3)\\ \\ Var(Y_5) &= 5\sigma^2 + 2\rho_1 + 2\rho_1 + 2\rho_2 + 2\rho_2 + 2\rho_1 + 2\rho_1 + 2\rho_2\\ Var(Y_5) &= 5\sigma^2 + 8\rho_1 + 6\rho_2 \end{aligned}
I'm having a hard time getting a generalized solution of $Y_n$ even if we use this case where $\rho_k=0$ for $k>2$. I think it should look something like above but can't figure out the form in term so $n$, $\rho$, and $\sigma^2$. I think it should look something like this
$$Var(Y_n) = n\sigma^2 + f(n)\rho_1 + g(n)\rho_2$$
Any ideas would be very helpful. I'm sadly a little far removed from pen and paper math. Thanks