Consider monoid $(\mathbb{N},*)$, where operation $*$ is defined as $x*y = xy + x + y$.
What is the result of $1*2*3*\text{...}*25 \text{ (mod 29)}$ ?
$xy + x + y$ can be written as $(x + 1) y + x$ or $y + x (1 + y)$, but that does not seem to help in any way.
One thing I noticed is that $n * (n + 1) = \text{prime number}$. Ex: $12*13=181$; $4*5=29$.
I am still not sure how can I express $1*2*3*\text{...}*25$ in such a way that I could find the remainder of it divided by $29$.
We can rewrite this operation like this:
$$x*y = (x+1)(y+1)-1 $$
It is asociative:
$$(x*y)*z = (x*y+1)(z+1)-1 = (x+1)(y+1)(z+1)-1$$
also
$$x*(y*z) = (x+1)(y*z+1)-1 = (x+1)(y+1)(z+1)-1$$
So $$1*2*3*\text{...}*25 = 2\cdot 3\cdot \text{...}\cdot 25\cdot 26 -1\text{ (mod 29)}$$ $$= 28^{-1}\cdot 27^{-1}\cdot 28!-1\text{ (mod 29)}$$ $$= (-1)\cdot (14)\cdot (-1)-1\text{ (mod 29)}$$ $$= 13\text{ (mod 29)}$$