I have the $N$x$N$ matrix below where $N$ is a power of 2 (usually 64 or 256) and $\omega = 2\pi/N$. What is its largest eigenvalue?


$\begin{bmatrix}
2 & 1 & 0 & 0 & \cdots & 0 & 0 & 1\\
1 & 2\cos(\omega) & 1 & 0 & \cdots & 0 & 0 & 0\\
0 & 1 & 2\cos(2\omega) & 1 & \cdots & 0 & 0 & 0\\
0 & 0 & 1 & 2\cos(3\omega) & \cdots & 0 & 0 & 0\\
\vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots & \vdots \\
0 & 0 & 0 & 0 & \cdots & 2\cos((N-3)\omega) & 1 & 0\\
0 & 0 & 0 & 0 & \cdots & 1 & 2\cos((N-2)\omega) & 1\\
1 & 0 & 0 & 0 & \cdots & 0 & 1 & 2\cos((N-1)\omega)
\end{bmatrix}$


This is exactly the $S$ matrix [here](https://www.cs.princeton.edu/%7Eken/Eigenvectors82.pdf) (which explains how this eigenvector is also the simplest eigenvector of the Discrete Fourier Transform); I am wondering if our analysis of this eigenvector has improved since 1982.


For large $N$, I know this eigenvalue tends to 4 and its eigenvector tends to a Gaussian, and I can numerically find the roots of the characteristic polynomial for more precision (e.g., this eigenvalue is 3.903025 for $N$=64), but is there a faster more-accurate method? Is there a closed-form solution?


To reiterate, the helpful points here are that $N$ is a power of 2 and I am only concerned with the highest eigenvalue.



The discrete Fourier transform's Gaussian-like eigenvector
A quick numerical investigation for $N$ up to 512 leads to a conjectured exact large-$N$ expansion of the largest eigenvalue,
$$
\lambda\_0(N) = 4 - \frac{2\pi}{N} + \frac{\pi^2}{2 N^2} - \frac{\pi^3}{24 N^3} + \frac{\pi^4}{48 N^4}
- c\_5 \frac{\pi^5}{N^5} + \ldots.
$$
The coefficient $c\_5^{-1} = -114.63(1)$ is negative and seems to be a more complicated expression.


**Added 16.07.22, 18:00 CEST**:


Extending the high-precision calculation to $N=1024$, the next two constants seem to be $c\_5=-67/(2^6 5!)$ and $c\_6=653/(2^7 6!)$. These terms should be verified with a precision higher than 30 digits.


**Edited 17.07.22, 15:00 CEST:**


I did this verification with 100 digits precision, verifying $c\_{5,6}$ and extending the series to 10th order.
Therefore,
$$
\lambda\_0(N) = 4 - \frac{2\pi}{N} 
+ \frac{\pi^2}{2 N^2} 
- \frac{\pi^3}{24 N^3} 
+ \frac{\pi^4}{48 N^4}
+ \frac{67\pi^5}{7680 N^5} 
+ \frac{653\pi^6}{92160 N^6}
+\frac{32519 \pi ^7}{5160960 N^7}
+\frac{135001 \pi ^8}{20643840 N^8}
+\frac{45750727 \pi ^9}{5945425920 N^9}
+\frac{1198585643 \pi ^{10}}{118908518400 N^{10}}
+\ldots.
$$
Note that the denominators of $c\_n$ are divisible by $n!$.


All constants were successively determined by a least-square fit of a 20th order polynomial in $\pi/N$ to $λ\_0(N)$. I did not find a known function with this series expansion.


For reference, I'll append the 30 digits results:
\begin{array}{ll}
N & λ\_0(N)\\
 128 & 3.95121320281088603898478521135 \\
 256 & 3.97553152996970070083424756460 \\
 384 & 3.98367098180919839228844082991 \\
 512 & 3.98774696887736782094115794509 \\
 640 & 3.99019456589827273460033342852 \\
 768 & 3.99182713285240169577614505117 \\
 896 & 3.99299366147114034625800714548 \\
 1024 & 3.99386878184121881247367446866 \\
\end{array}


