While I was learning about the primitive roots modulo $p \in \Bbb P$ (I will call $Pr_p$ to the complete list of the primitive roots module $p$) and having in mind the conjecture explained in this nice question about the Fortunate numbers and variations of that conjecture for factorials, I found (only empirically tested with Python) that the following expressions are true $\forall p \in [1,1000]$, $p \in \Bbb P$:

Let $\mathcal{P}(n)$ be the previous prime smaller than $n$:

$\prod Pr_p\:-\mathcal{P}(\prod Pr_p) = d_1$ is either $1$ or a prime.

Let $\mathcal{N}(n)$ be the next prime greater than $n$:

$\mathcal{N}(\prod Pr_p)-\prod Pr_p\: = d_2$ is either $1$ or a prime.

So it seems that the product of the primitive roots modulo a prime $p$ is at a distance $d_1$ of its previous closer prime and a distance $d_2$ of its closer next prime, being $d_1$ and $d_2$ = 1 or a prime number.


$Pr_{17}=\{3, 5, 6, 7, 10, 11, 12, 14\}$

$\prod Pr_{17}=11642400$

$\mathcal{P}(\prod Pr_{17})=11642387$, so $d_1=11642400-11642387=13$

$\mathcal{N}(\prod Pr_{17})=11642419$, so $d_2=11642419-11642400=19$

(*) Notice that in the sample by chance $d_1$ and $d_2$ incidentally are exactly the previous and next prime numbers of the original $p=17$.

I just like to play with the numbers and find relationships between them that I did not know, and usually that is empirical. My theoretical knowledge is quite basic (usually I learn from the answers at MSE very much!). I wanted to share with you the following questions to know more about the properties of the primitive roots modulo $p$:

  1. Does it make sense that according to the definition or properties of the primitive roots modulo a prime $p$, the product of them was able to have those properties?

  2. Is there a counterexample of them? (my computer takes time for bigger values of $p$ so if somebody with Mathematica or other software, a good computer and interested in the topic could give it a try, that would be really appreciated)

  3. Is it a trivial property?

UPDATE 2015/05/18: added in my blog the Python code for the test in the interval [1,1000].

Thank you!

  • 1
    $\begingroup$ math.stackexchange.com/questions/1214065/… ?? $\endgroup$ May 15, 2015 at 9:25
  • $\begingroup$ thanks for the link, is related but not the same topic as far as I can see, my uestion is regarding other property of the product... $\endgroup$
    – iadvd
    May 15, 2015 at 9:55
  • 1
    $\begingroup$ Related: oeis.org/A123475 $\endgroup$
    – Charles
    May 15, 2015 at 19:17
  • $\begingroup$ Tested through 5531 with no counterexamples for d1/d2. As I tried to comment on your blog (but never appeared), this reminds me of the Frank Buss conjectures (oeis.org/A068836, oeis.org/A067362, etc) $\endgroup$
    – DanaJ
    May 18, 2015 at 15:17
  • $\begingroup$ @DanaJ thanks for taking time to verify it! I have checked the blog and I can not see any comments, probably because it is blogger it is required some kind of login to leave a comment, or it failed, I have comments preview, and it does not show anything unfortunatelly. Regarding the OEIS links, yes, all of them are variations of the Fortunate numbers conjecture, but instead of primorials, using factorial expressions, etc. Imho an interesting point is:which one is the minimum expression that makes that kind of conjecture true?I wrote about it here: math.stackexchange.com/a/1276872/189215 $\endgroup$
    – iadvd
    May 18, 2015 at 23:56

1 Answer 1


My thoughts so far:

1) The property does make sense. The number you generate, $\prod Pr_n$, has a lot of small prime factors, which clearly cannot divide the gap to the next prime (in either direction), so the likelihood is that the next prime is less than $p_\times(n)^2$ distant, where $p_\times(n)$ is the smallest prime that does not divide $\prod Pr_n$.

2) I would expect that there is a counterexample, but it could be extremely large. No doubt someone can make a probabilistic argument about exactly how large it will be. I have investigated some values of $p_\times(n)$ for $n$ up to $10000$ to see if there are any likely candidates:

enter image description here

Looking for low values of $p_\times(n)$:

enter image description here

So, for example, if one of the nearest primes to $\prod Pr_{6007}$ is $181^2=32761$ away, we would have a counterexample.

3) I don't know about it being a trivial property - it is, perhaps, expected from the construction, as discussed above.

  • $\begingroup$ thank you for your generosity, you took time to verify it, I have no words! please may I ask about point 1? for the sample I wrote in the question, $p=17$ then according to your definition $p_\times(17)=2$? or it would be $p_\times(17)=13$? if it is 2 then $2^2=4$ is less than $d_1=13$ and $d_2=19$ so probably you would mean the smaller odd prime, then it would be $p_\times(17)=13$. Your answer is one of the reasons to love MSE! thanks again. $\endgroup$
    – iadvd
    May 17, 2015 at 5:07
  • $\begingroup$ sorry disregard my previous question! I forgot about the even primitive roots!! for some reason I was thinking about the prime primitive roots only, too bad :) $\endgroup$
    – iadvd
    May 17, 2015 at 8:37
  • 1
    $\begingroup$ @iadvd no problem... as usual $\uparrow$ and $\checkmark$ would be welcome :-) . There are some interesting patterns in $p_\times$ that I might explore sometime - the primes hitting the top line are some subset of $5 \bmod 6$ for example. $\endgroup$
    – Joffan
    May 17, 2015 at 22:35
  • 1
    $\begingroup$ @iadvd you might also be interested in my question about upper and lower primitive roots. One interesting side observation is the symmetry of primitive roots for primes $p\equiv1 \bmod 4$. $\endgroup$
    – Joffan
    May 19, 2015 at 17:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .