<s>[INST] Prime numbers of the form $(1\times11\times111\times1111\times...)-(1+11+111+1111+...)$ Let
$$R(1) = 1-1,$$
$$R(2) = (1\times11) - (1+11),$$
$$R(3) = (1\times11\times111) - (1+11+111),$$ and so on...
$$R(4)=1355297\quad\text{(a prime number!)}$$
$R(4)$ is the only prime I found of such form up to $R(200)$. Are there anymore primes of such form?
 [/INST] *

*Just a very basic observation, not a complete answer. Let's note by
$$a_n=1111...1$$
with $n$ of $1's$. So we have
$$a_n \equiv 1 \pmod{10}$$
And
$$\prod_{k=1}^{n} a_k \equiv 1 \pmod{10}$$
And
$$\sum_{k=1}^{n} a_k \equiv n \pmod{10}$$
And
$$R(n)=\prod_{k=1}^{n} a_k - \sum_{k=1}^{n} a_k \equiv 1 - n \pmod{10}$$
So, whenever $n-1$ is divisible by $2,5$ or $10$, $R(n)$ is not a prime.

*And another one is $$a_n \equiv \sum_{k=1}^{n}1=n \pmod{9}$$
So
$$\prod_{k=1}^{n} a_k \equiv n! \pmod{9}$$
And
$$\sum_{k=1}^{n} a_k \equiv \frac{n(n+1)}{2} \pmod{9}$$
And
$$R(n)=\prod_{k=1}^{n} a_k - \sum_{k=1}^{n} a_k \equiv n! - \frac{n(n+1)}{2} \pmod{9}$$
For $n \geq 6$ with $\frac{n(n+1)}{2}$ divisible by 3, $R(n)$ is not a prime. Out of $n=6t$, $n=6t+1$, $n=6t+2$, $n=6t+3$, $n=6t+4$ and $n=6t+5$ only $n=6t+1$ and $6t+4$ could yield primes. Because $n=6t+1$ is clarified by the case 1 ($n-1 = 6t$ divisible by $2$) we are left with $6t+4$.

*Another basic observation is $$\gcd(a_p,a_q)=1$$
where $p,q$- primes. A short proof is here.

</s>