I'm trying to find the formula for $\operatorname{lcm}(2n-1,2n+1)$ with $n \in \mathbb{Z}$. Here is my solution but I'm not sure about it. We know that $$\operatorname{lcm}(a,b)=\frac{\lvert ab \lvert}{\gcd(a,b)}$$ Now if we substitute we have: $$\operatorname{lcm}(2n-1,2n+1)=\frac{\lvert (2n-1)(2n+1) \lvert}{\gcd(2n-1,2n+1)}=\frac{\lvert (4n^2-1) \lvert}{\gcd(2n-1,2n+1)}$$ Now we compute $\gcd(2n-1,2n+1)$, We can notice that $$2n+1=(2n-1)+2$$ Thus the 2 arguments are not divisible (unless $n=0$) hence $\gcd(2n-1,2n+1)=1$
We can conclude that $$\operatorname{lcm}(2n-1,2n+1)=\lvert (4n^2-1) \lvert$$
$$\text{lcm}(2n-1,2n+1) = \frac{(2n-1)(2n+1)}{\gcd(2n-1,2n+1)}$$
Note that $\gcd(a,b) = \gcd(a-b,b)$ if $a>b$, and $\gcd(a,b) = \gcd(a,b-a)$ if $a<b$.
Since $2n+1 > 2n-1$:
$$\frac{(2n-1)(2n+1)}{\gcd(2n-1,2n+1 - (2n-1))} = \frac{(2n-1)(2n+1)}{\gcd(2n-1,2)} = (2n-1)(2n+1)$$