14

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?

Frenzy Li
  • 3,685
Henry R
  • 171
  • $R(200)$ is a large number. How did you check it's primality? – Sarvesh Ravichandran Iyer Aug 29 '16 at 10:08
  • $R(200)$ has $19,910$ digits. With Fermat's little theorem, such numbers can be easily proven to be composite : An odd number $n$ not satisfying $2^{n-1} \equiv 1\ (\ mod\ n\ )$ must be composite. – Peter Aug 29 '16 at 10:15
  • 6
    The downvotes are hard to understand. The OP even shows an effort. – Peter Aug 29 '16 at 10:18
  • 2
    @Peter: The down-votes are completely unnecessary. The question is interesting. Perhaps it should rephrased from "Are there anymore prime of such form" to "How can it be proven that there are no other primes of such form". But that's it. Voters here sometimes act like a herd. – barak manos Aug 29 '16 at 10:20
  • 1
    I super like this question!! Everything that has something to do with primes deserves a +1 for me! Down votes are due to IDIOTS that understand nothing about maths. The site shall have more sever rules about down votes. – Enrico M. Aug 29 '16 at 10:22
  • @Henry R: Please note that $R(n)=\prod\limits_{k=0}^{n-1}\frac{10^{k+1}-1}{9}-\sum\limits_{k=0}^{n-1}\frac{10^{k+1}-1}{9}$. – barak manos Aug 29 '16 at 10:23
  • @Beta A very nice idea! – Peter Aug 29 '16 at 10:25
  • 4
    @Beta However, your post is somewhat offense. But in principle, I agree. – Peter Aug 29 '16 at 10:30
  • 4
    @Peter Thank you! Well the offense is necessary because the most of times it's about people who open the page, down vote and then close the page and bye bye. No matter if the question is really useless or cool. I've noticed this tendency: if it's not high maths, there are people here who down vote with freedom. They believe they are super cool but they are nothing that vapid persons. It's a site for curious people, ideas, problems and help. Not about who has the biggest stick. – Enrico M. Aug 29 '16 at 10:35
  • 4
    @Beta, trouble with offending people here is just the same as in real life: it's not that there is no one to deserve it, just that it cuts down communication abruptly. It is always unnecessary if you really want your point to come across to the intended people (and if you can't do it without offense, what does it tell about you?). Let us keep this site a clean oasis in cesspool that is the Internet. – Ennar Aug 29 '16 at 10:49
  • I've tested $R(n)$ up to $R(753)$ via Mathematica's PrimeQ method. It now has been stuck on $R(754)$ for a lot longer than any other value prior to it. Maybe its a prime candidate... – Ian Miller Aug 31 '16 at 13:54
  • @IanMiller $1663|R(754)$ – Peter Aug 31 '16 at 17:07
  • Thanks @Peter. My code is still running through values. Its now finished up to $R(837)$. I believe as others have said that any other prime values are statistically unlikely. – Ian Miller Aug 31 '16 at 23:27
  • @IanMiller if you look at my answer you'll see that you can avoid quite a few cases by just considering those $R(n)$ where $n=6t+4$ and ignoring $5 \mid n-1$ cases – rtybase Sep 01 '16 at 17:18

4 Answers4

2

Probabilistic answer: If $\phi_n\in {\Bbb N}$ is a sequence of 'random' integers going to infinity then the probability of $\phi_n$ being a prime is $\sim 1/\ln \phi_n$. When $\sum_{n\geq N} \frac{1}{\ln \phi_n}$ goes to zero fast with $N$ it is most 'likely' that there are no primes among these numbers for $N$ large. The words 'random' and 'likely' are obviously subject to interpretations.

H. H. Rugh
  • 35,236
2

If another prime of the form $R(n)$ exists, then $n$ must be at least $490$ and $R(n)$ must have more than $100,000$ digits.

For the following numbers $n\le 1000$, $R(n)$ has no "small" prime factor :

$$[52, 490, 532, 574, 592, 922, 928, 964]$$

$R(1000)$ has already $499,546$ digits.

It is unlikely that there is another prime $R(n)$ because the sequence grows very fast and the chance that a number with more than $10^5$ digits is prime, is very low. Of course, this is not a proof.

A proof that there is no other prime should be out of reach. The only chance seems to be : Finding another prime.

Peter
  • 84,454
1
  1. 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.

  2. 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$.

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

I wanted to post this as a comment but it was too long.

I don't know if it will help but consider to rewrite your function in this way:

$$R(n) = (1 \times 11 \times 111 \times \ldots) - (1 + 11 + 111 + 1111 + \ldots)$$

$$R(n) = \left((10^0) \times (10^0 + 10^1) \times (10^0 + 10^1 + 10^2) \times \ldots\right) - \left((10^0) + (10^1 + 10^0) + (10^2 + 10^1 + 10^0) + \ldots \right)$$

Now with a bit of maths you can check that

$$\left((10^0) \times (10^0 + 10^1) \times (10^0 + 10^1 + 10^2) \times \ldots\right) = \prod_{k = 1}^n \frac{10^k - 1}{9}$$

For what concerns the second part, it's more amusing. Indeed we have

$$\left((10^0) + (10^1 + 10^0) + (10^2 + 10^1 + 10^0) + \ldots \right)$$

But as we tend to $n$, we can easily check that there will be $n$ terms of $10^0$, $n-1$ terms of $10^1$, $n-2$ terms of $10^2$ and so on, which means

$$\left((10^0) + (10^1 + 10^0) + (10^2 + 10^1 + 10^0) + \ldots \right) = \sum_{k = 0}^{n-1} (n-k)10^k$$

Now with a bit of help (mathematica rules), the productory gives

$$\prod_{k = 1}^n \frac{10^k - 1}{9} = 9^{-k} {Q}_p (10, 10, k)$$

Where ${Q}_p (10, 10, k)$ is the so called q-Pochammer symbol, whose definition is

$${Q}_p (a, q, k) = \prod_{i = 0}^{k-1} (1 - aq^i)$$

Ref https://en.wikipedia.org/wiki/Q-Pochhammer_symbol

Whereas the sum gives

$$\sum_{k = 0}^{n-1} (n-k)10^k = \frac{1}{81}\left(10^{1+n} - 9n - 10\right)$$

Thus your function is

$$R(n) = 9^{-k} {Q}_p (10, 10, k) - \frac{1}{81}\left(10^{1+n} - 9n - 10\right)$$

As I said, I don't know if this helps, but it's a good way to check $R(n)$ quite fast.

Please If I made some mistake, make a comment. I liked this question and I immediately got involved in trying to find a suitable general form for $R(n)$.

Enrico M.
  • 26,114
  • $10^2+1\neq111$ – barak manos Aug 29 '16 at 10:29
  • Yes, how did you arrive to the following conclusion? $$\prod_{k=1}^{n} \frac{10^k-1}{9}=9^{-n}\left ( 10^{\frac{n(n+1)}{2}} -1 \right )$$ e.g. try $n=3$ – rtybase Aug 29 '16 at 11:26
  • @rtybase as I wrote, I computed it with the help of Mathematica! – Enrico M. Aug 29 '16 at 11:27
  • Well, it's wrong https://www.wolframalpha.com/input/?i=(9++99++999)+%2F+(9%5E3) and https://www.wolframalpha.com/input/?i=(10%5E(6)-1)+%2F+(9%5E3)%3D – rtybase Aug 29 '16 at 11:28
  • @rtybase You're right, I am going to edit! Thanks!! – Enrico M. Aug 29 '16 at 11:30
  • Hmmm ... @FourierTransform there is a complain button where you can provide a message and admins will find the wrongdoers .. I totally have no idea why mine was down-voted either :( – rtybase Sep 01 '16 at 17:13
  • @rtybase I get annoyed as fast as I let it go. You know why? Because often it's about random people who open the page, put a down vote and close it. And it's not worth it. Neither to get angry nor to complain.. I'm sorry for your down vote too! – Enrico M. Sep 01 '16 at 17:15