Let $n$ be a positive integer and $$p(n) =(n+1)(n-1),$$ $$q(n) =(n+1)(n+1), $$ $$r(n) = (n+1)(n+1)(n-1).$$
I think that $r(n)$ is the least common multiple of $p(n)$ and $q(n)$. The values of these polynomials at $n = 3$ are $p(3) = 8, q(3) = 16$ and $r(3) = 32.$
But the lcm of $8$ and $16$ is $16$, not $32.$ Please explain me why $r(3)$ is not the least common multiple of $p(3)$ and $q(3)$ in spite of $r(n)$ being the lcm of $p(n)$ and $q(n).$ I have been looking for an answer but I couldn´t find one.
You don’t need the complicated example. Just use $p(n)=n-1, q(n)=n+1.$
Then it is true that $(n-1,n+1)$ have no common factors, as polynomials, so by unique factorization, their least common multiple is the product.
This is not true for $n$ an odd number. Then $n-1,n+1$ have a common factor, so their least common multiple is $2.$
For an even simpler example, the polynomials $f(n)=n$ and $g(n)=3$ are relatively prime, but $3a$ is not the LCM of $a$ and $3$ when $a$ is divisible by $3.$
In $R=\mathbb Z[x],$ the ring of integer polynomials, it is true that $x+1$ and $x-1$ do not have a common factor. But there is a stronger form of “relatively prime.”
If $p(x),q(x)\in R,$ then the condition that there is a solution pair $u(x),v(x)\in R$ to: $$p(x)u(x)+q(x)v(x)=1,\tag1$$ is stronger than $p(x),q(x)$ just being relatively prime.
(Does anybody know if this property has a name? “Bézout relatively prime” would be a guess.)
If there is a solution to this, then $p(a)q(a)$ is always the least common multiple of $p(a),q(a).$
But there is no solution $u(x),v(x)$ for $x-1,x+1.$ The existence of such pairs turns out to be due to the fact that $\mathbb Z[x]$ is not a “principal ideal domain.” In particular, the “ideal” of all combinations of $x-1,x+1$ with $u(x),v(x)$ is the set of polynomials $f(x)$ where $f(1)$ is even.
If $f(x)=(x-1)u(x)+(x+1)v(x)$ then $f(1)=2v(1),$ is even.
On the other hand, If $f(1)=2m$, then $f(x)-2m$ has $1$ as a root, so we have $f(x)-2m=(x-1)g(x)$ for some polynomial $g(x),$ and thus: $$\begin{align}f(x)&=(x-1)g(x)+2m\\&=(x-1)g(x)+((x+1)-(x-1))m\\&=(x-1)(g(x)-m)+(x+1)m.\end{align}$$