# Modular Eqn-system with $3$ unknowns $(r,s,t)$: formula for the maximal solution $t$ (given $r$)?

This question focuses an unmentioned detail arosen in an earlier question, see this

I've recently reread an older sketch of mine and reconsidered the following set of modular equations in three even integer unknowns $$(r,s,t) \in 2\mathbb N^+$$ . :
$$\begin{array} {} r&+s&+rs & \equiv 0 &\pmod t \\ s&+t&+st & \equiv 0 &\pmod r \\ t&+r&+tr & \equiv 0 &\pmod s \\ \end{array} \tag 1$$

I've found empirically that given $$r$$ the range for the possible $$t$$ was upper-bounded by $$t\le(r+1)^3-1$$ so $$t_\text{max}=(r+1)^3-1 \tag 2$$ and by this $$s_{t_\text{max}}=(r+1)^2-1$$.
(It is possible that some other $$s$$ itself is larger than $$s_{t_\text{max}}$$ but then $$t_s$$ is smaller than $$t_\text{max}$$).

I think I've had already an argument for this but don't find the notice and cannot reproduce it, so my earlier thinking might even have been wrong.

Question: How can it be proved that the largest possible $$t$$ is indeed $$t_\text{max}=(r+1)^3-1$$?

Additional question: can the proof be formed in a way that it generalizes to the analoguous system with four or more variables?
Example: let $$r=2$$ ,then $$t_\text{max}=26$$ and $$s_{t_\text{max}}=8$$ form a solution. There is no larger $$t$$ possible when $$r=2$$.
However $$s$$ can be larger than $$8$$ but then $$t_s$$ reduces, and one possible solution is then $$(r,s,t_s)=(2,10,16)$$ . See some more examples in my linked earlier question.

What I have seen so far which seems relevant is the following. Assume with some given even $$r$$ such that $$(r+1,s+1,t+1)=(R,R^2,R^3)$$. Then from the first equation in (1) we get for the lhs $$\text{lhs}_1 = (r+1)\cdot (s+1) -1 = R \cdot R^2 -1 =R^3-1$$ So for $$t=R^3-1$$ the lhs equals the rhs and the modulo-condition is trivially true.
From the third equation in (1) we get $$\text{lhs}_3 = (r+1)\cdot (t+1) -1 = R \cdot R^3 -1 =R^4-1$$ Since $$s=R^2-1$$ by assumption we ask whether the lhs is divisible by the rhs and because always $$R^2-1 | R^4-1=(R^2-1)(R^2+1)$$ the equation ins satisfied.

From the second equation in (1) we get $$\text{lhs}_2 = (s+1)\cdot (t+1) -1 = R^2 \cdot R^3 -1 =R^5-1$$ Since $$r=R-1$$ by assumption we ask whether the lhs is divisible by the rhs and because $$R-1 | R^4-1$$the equation ins satisfied.

This does no more work, when $$t+1=R^k$$ with $$k>3$$. Let's look if $$k=4$$.
We could insert in Eq 1 in (1) the value $$s+1=R^3$$ and this becomes $$\text{lhs}_1= R \cdot R^3 -1 = R^4 -1$$ so the congruence is satisfied. But using Eq. 3 with this we get $$\text{lhs}_3= R \cdot R^4 -1 = R^5 -1$$ But now we have that $$R^2-1 \not \mid R^5-1$$ and the required congruence does not occur.

It seems, I've found myself an answer.

We stay with writing $$R,S,T$$ as odd numbers, and $$r=R-1, s=S-1,t=T-1$$ even numbers. In the case of $$R,S,T$$ being prime, the $$r,s,t$$ are the Euler's $$\varphi()$$ of that primes, and a triple of primes fulfilling the eqn-system are also constructing Carmichael-numbers $$n=RST$$ .

Assume $$R$$ is the smallest and $$T$$ the largest of the numbers, my question was, whether with a given $$R$$ the value $$T=R^3$$ is the maximal value for $$T$$ which allows a solution for the eqn-system, where then moreover $$S=R^2$$. From the given eqn-system $$\begin{array} {} r&+s&+rs & \equiv 0 &\pmod t &\qquad & \small (1.1) \\ s&+t&+st & \equiv 0 &\pmod r && \small(1.2)\\ t&+r&+tr & \equiv 0 &\pmod s && \small(1.3)\\ \end{array} \tag 1$$ we reformulate for notational easiness with some positive integer $$i,j,k$$ reflecting the modularity-conditions $$\begin{array} {} (r+1)&(s+1)&&-1 & = it &\qquad & \small (2.1) \\ & (s+1)&(t+1)&-1 & = jr &\qquad & \small (2.2) \\ (r+1)&&(t+1)&-1 & = ks &\qquad & \small (2.3) \\ \end{array} \tag 2$$ and even more compact $$\begin{array} {} R&S&& = iT &- (i-1) &\qquad & \small (3.1) \\ & S&T& = jR &- (j-1) &\qquad & \small (3.2) \\ R&&T& = kS &-(k-1) &\qquad & \small (3.2) \\ \end{array} \tag 3$$ We assume now, that $$T$$ has the maximal possible values and thus that $$i=1$$ in the first equation. We can then express $$S$$ as $$S=T/R$$ (note that so far nothing is required in regard of primeness of the $$R,S,T$$-values!)
We get then

$$\begin{array} {} S &= T/R & &\qquad & \small (4.1) \\ T/R \cdot T &= jR &- (j-1) &\qquad & \small (4.2) \\ R \cdot T &= kT/R &-(k-1) &\qquad & \small (4.3) \\ \end{array} \tag 4$$ The last equation (4.3) can be reformulated $$T(k/R-R) = (k-1) \\ T = { k-1 \over k/R-R}$$ finally arriving $$T= R{ k-1 \over k-R^2 } \tag 5$$ We see, that $$k=R^2$$ is a critical value, because the denominator vanishes and we have a singularity. To have positive finite values for all it is thus required that $$k \ge R^2+1$$ .
Assume $$k = R^2+1$$ then $$T= R{ R^2 \over 1 } = R^3 \tag {5.1}$$ If we increase $$k$$ to become $$k=R^2+2$$ then we have $$T= R{ R^2 +1\over 2 } \lt R^3 \tag {5.2}$$ and thus $$T$$ is smaller and has no more its maximal possible value. Of course if $$k \to \infty$$ we have $$\lim_{k \to \infty} T= R{ 1 - 1/k \over 1-R^2/k } = R \lt R^3 \tag {5.3}$$ which is the minimal solution for $$T$$.

So I've proved that indeed the maximal solution for $$T$$ is $$T=R^3$$.
Formula 1 for fitting triples: $$(R,S=R^2,T=R^3)$$ give the triple with largest $$T$$ for a given $$R$$

As a preview on further discussions we can state now, that for a squarefree integer $$n$$ with three distinct primefactors $$(R,S,T)$$, such that $$n=RST$$ and morever being of the Carmichaeltype we have the following bounds for the primefactors:

Corrolary 1: $$\sqrt[6]n \le R \lt S \lt T \le \sqrt n$$ and thus the number of Carmichaelnumbers with a given smallest primefactor $$R$$ is bounded.

There is one more small pointe.

It is not obvious, that there are also solutions with $$S>R^2$$ and still $$S such that then $$S. I looked for the maximal $$S$$ with the condition $$R^2 \lt S.

The following is induced by heuristics.

Empirically the maximal values for $$s$$ (depending on increasing $$r$$) occur if $$r$$ (from where also $$R=r+1$$) has the form $$r= k(k+1)$$ and thus $$R=k^2+k+1$$ or written differently $$R=(k^3-1)/(k-1)$$

Then based on the first handful of values of $$k$$ and $$R$$ we get the formula for the fitting triples:

Formula 2 for fitting triples $$(R,R^2
$$\begin{array} {} R&= k^2+k+1 \\ S&= f(k) &= 2k^4 +3k^3+3k^2+2k+1 \\ T&= g(k) &= 2k^4 +5k^3+6k^2+3k+1 \end{array} \tag 6$$ which holds perfectly, for all tested $$k<1000$$ .
If for any other $$R$$ there exists a triple $$R,R^2 then $$S$$ is smaller than $$f(k)$$ where $$k$$ is calculated with a fractional value such that $$R=k^2+k+1$$

Of course, the solutions $$(R,S=R^2,T=R^3)$$ give composite $$S$$ and $$T$$ and so are not in the set of Carmichael-numbers. However, triples $$(k,R=k^2+k+1,S=f(k),T=g(k))$$ may be all prime and thus define Carmichaelnumbers $$n=RST$$ but because they are maximal values (for given $$R$$) they define also somehow an upper bound for Carmichael numbers occuring (which are named for having the property that $$\varphi(R),\varphi(S),\varphi(T) | n-1 = RST-1$$ and similarly for any larger multitude of distinct primefactors)