For each positive integer \(n \geq 3\), define \(A_n\) and \(B_n\) as
\[
\begin{gathered}
A_n=\sqrt{n^2+1}+\sqrt{n^2+3}+\cdots+\sqrt{n^2+2 n-1}, \\
B_n=\sqrt{n^2+2}+\sqrt{n^2+4}+\cdots+\sqrt{n^2+2 n}
\end{gathered}
\]
Determine all positive integers \(n \geq 3\) for which \(\left\lfloor A_n\right\rfloor=\left\lfloor B_n\right\rfloor\).
Note. For any real number \(x,\lfloor x\rfloor\) denotes the largest integer \(N\) such that \(N \leq x\).
Obviously, \(B_n>A_n\ , \forall n\in\mathbb{N}\). Let us bound the value \(B_n-A_n\),
\[B_n-A_n=\left(\sqrt{n^2+2}-\sqrt{n^2+1}\right)+\left(\sqrt{n^2+4}-\sqrt{n^2+3}\right)+\cdots+\left(\sqrt{n^2+2n}-\sqrt{n^2+2n-1}\right)\]
\[=\frac{1}{\sqrt{n^2+2}+\sqrt{n^2+1}}+\frac{1}{\sqrt{n^2+4}+\sqrt{n^2+3}}+\cdots+\frac{1}{\sqrt{n^2+2n}+\sqrt{n^2+2n-1}}\]
\[>\frac{1}{\sqrt{n^2+2n}+\sqrt{n^2+2n-1}}+\frac{1}{\sqrt{n^2+2n}+\sqrt{n^2+2n-1}}+\cdots+\frac{1}{\sqrt{n^2+2n}+\sqrt{n^2+2n-1}}\]
\[=\frac{n}{\sqrt{n^2+2n}+\sqrt{n^2+2n-1}}>\frac{n}{\sqrt{n^2+2n+1}+\sqrt{n^2+2n+1}}=\frac{n}{2n+2}\]
Similarly,
\[B_n-A_n<\frac{1}{\sqrt{n^2+2}+\sqrt{n^2+1}}+\frac{1}{\sqrt{n^2+2}+\sqrt{n^2+1}}+\cdots+\frac{1}{\sqrt{n^2+2}+\sqrt{n^2+1}}\]
\[=\frac{n}{\sqrt{n^2+2}+\sqrt{n^2+1}}<\frac{n}{\sqrt{n^2}+\sqrt{n^2}}=\frac{1}{2}\]
Hence, \[\boxed{\frac{n}{2n+2}<B_n-A_n<\frac{1}{2},\ \forall n\in\mathbb{N}}\]
Let \(\{x\}\) denote the fractional part of the real number \(x\) and adding (or) subtracting integer to \(x\) to not alter its fractional part. Then,
\[\{A_n\}=\left\{\left(\sqrt{n^2+1}-n\right)+\left(\sqrt{n^2+3}-n\right)+\cdots+\left(\sqrt{n^2+2n-1}-n\right)\right\}\]
\[\Rightarrow \{A_n\}=\left\{\frac{1}{\sqrt{n^2+1}+n}+\frac{3}{\sqrt{n^2+3}+n}+\cdots+\frac{2n-1}{\sqrt{n^2+2n-1}+n}\right\}\]
Let us now analyse the number \(Y=\frac{1}{\sqrt{n^2+1}+n}+\frac{3}{\sqrt{n^2+3}+n}+\cdots+\frac{2n-1}{\sqrt{n^2+2n-1}+n}\). Note that, \[Y<\frac{1}{\sqrt{n^2+1}+n}+\frac{3}{\sqrt{n^2+1}+n}+\cdots+\frac{2n-1}{\sqrt{n^2+1}+n}\]
\[=\frac{n^2}{\sqrt{n^2+1}+n}<\frac{n^2}{\sqrt{n^2}+n}=\frac{n}{2}\]
Similarly,
\[Y>\frac{1}{\sqrt{n^2+2n-1}+n}+\frac{3}{\sqrt{n^2+2n-1}+n}+\cdots+\frac{2n-1}{\sqrt{n^2+2n-1}+n}\]
\[=\frac{n^2}{\sqrt{n^2+2n-1}+n}>\frac{n^2}{\sqrt{n^2+2n+1}+n}=\frac{n^2}{2n+1}\]
Hence, we get that, \(\frac{n^2}{2n+1}<Y<\frac{n}{2}\). But we have, \(\frac{n^2}{2n+1}>\frac{n-1}{2}>\frac{n}{2}-1\), which is trivial just by cross multiplication. So,
\[\boxed{\frac{n}{2}>Y>\frac{n^2}{2n+1}>\frac{n-1}{2}>\frac{n}{2}-1}\]
Case 1: \(n\) is odd, then \(\{Y\}<\frac{1}{2}\). So, \(\{A_n\}=\{Y\}<\frac{1}{2}\) and hence \(B_n\) and \(A_n\) will have the same integer part since \(B_n-A_n<\frac{1}{2}\)
Case 2: \(n\) is even, then \(\{Y\}>\frac{n^2}{2n+1}-\left(\frac{n}{2}-1\right)=1-\frac{n}{4n+2}>1-\frac{n}{2n+2}\).
Now notice that \(\{A_n\}=\{Y\}>1-\frac{n}{2n+2}\) and we have \(B_n-A_n>\frac{n}{2n+2}\) and adding these both we get \(B_n-(A_n-\{A_n\})>1\Rightarrow B_n-\lfloor A_n\rfloor>1\Rightarrow \lfloor B_n\rfloor\neq \lfloor A_n\rfloor\)
Hence, all the odd numbers \(n\geq 3\) will satisfy \(\lfloor B_n\rfloor=\lfloor A_n\rfloor\) and none of the even numbers satisfy