3

When a number $n$ does not have primitive roots modulo n, $Pr(n)$, it is possible to generate the set $M$ of those numbers $m$ whose order $ord_n(m)$ is the maximum multiplicative order of $k$ in $\Bbb Z/n \Bbb Z$, also named as the maximum possible order mod n depending on the reference you use. The definition of the order $ord_n(m)$ of an integer m modulo n (or multiplicative order of $k$ in $\Bbb Z/n \Bbb Z$) is here (click).

Update Note: as explained in the answers, $Max(ord_n(m))$ is the maximum possible value of the Carmichael function in [1,n].

$M=\{\ m: ord_n(m) = Max(ord_n(k))\ ,\ k \in [1,n]\ \}$

I have observed two interesting properties and I would like to ask about them, this is the first one:

(1) $\forall n\ /\ \not\exists Pr(n)\ ,\ Max(ord_n(k))\mid\ \frac{\varphi(n)}{2}$

I guess this is a known property of the numbers that do not have primitive roots: $Max(ord_n(k))$ seems to have the same property as a quadratic residue modulo n, so it is a factor of $\frac{\varphi(n)}{2}$ (in other words, it can divide the half of the value of the totient of $n$).

The second one is very related with the following conjecture in this question about the Totient funcion (link)

(c) $\forall n\ge3$, if $(\frac{\varphi(n)}{2}+1)\ \mid\ n\ $ then $(\frac{\varphi(n)}{2}+1)\in \Bbb P$

When I replace in (c) according to property (1) $\frac{\varphi(n)}{2} = Max(ord_n(k))$ then the following property (2) is true in all cases:

(2) $\forall n\ /\ \not\exists Pr(n)\ ,\ $ if $\ (Max(ord_n(k))+1)\mid n\ ,$ then $\ (Max(ord_n(k))+1)\in\Bbb P$

Meaning that for all those numbers $n$ without primitive root modulo n, if the maximum possible order $Max(ord_n(k))$ plus one divides to $n$, then $Max(ord_n(k))+1$ is always a prime number.

E.g.:

$n=12, M=\{5,7,11\}$

$\forall m \in M\ ord_{12}(m)=Max(ord_{12}(k))=2$ and

$Max(ord_{12}(k)) +1 =2+1=3\mid 12\ $ , thus $3 \in \Bbb P$

$n=104, M=\{7,11,15,19,33,37,41,45,59,63,67,71,85,89,93,97\}$

$\forall m \in M\ ord_{104}(m)=Max(ord_{104}(k))=12$ and

$Max(ord_{104}(k)) +1 =12+1=13\mid 104\ $ , thus $13 \in \Bbb P$

I have tested with Python in the interval [1,1000] (it gets very slow for $n \gt 1000$, I need to try PARI) and no counterexamples are found, all the results are prime numbers.

These are the first prime numbers obtained:

$\{3,5,5,7,3,7,5,11,13,5,7,11,17,13,7,19,5,7,13,11,17,23...\}$

Coming from the $n$'s:

$\{12,15,20,21,24,28,30,33,39,40,42,44,51,52,56,57,60,63,65,66,68,69...\}$

I would like to share with you the following questions:

  1. Is my proposed statement (2) already known or trivial?
  2. Is there a counterexample of it?

Thank you!

iadvd
  • 8,875
  • 1
    Can you label statement (3)? I don't see it anywhere in the question, so can't begin to answer the questions. – DanaJ May 21 '15 at 20:02
  • 1
    Please note that your notation is very hard to parse and this reduces your chances for answers. Also, I would like to point out that what you call $\text{ord}_n(k)$ is the multiplicative order of $k$ in $\Bbb{Z}/n\Bbb{Z}$, while the notation $\text{ord}_n(k)$ usually refers to the additive order of $k$ in $\Bbb{Z}/n\Bbb{Z}$, unless otherwise stated. – A.P. May 21 '15 at 20:27
  • 1
    Wikipedia and MathWorld both use ${\rm ord}_n(k)$ to denote multiplicative order. My primary references (Apostal, Cohen, H&W, Riesel) don't seem to use the notation at all, but I may have missed it. – DanaJ May 21 '15 at 21:20
  • 1
    @DanaJ my fault, it is statement (2), originally I had tagged the conjecture (c) as statement (2) but then I renamed it to (c) to keep (1) and (2) for the two statements of the question. Fixed! – iadvd May 21 '15 at 23:55
  • @A.P. totally true! and I appreciate very much your explanation, because indeed my only source of information is the link I added at the beginning of the question and the wikipedia, but I did not know the correct way of naming this structure. I will fix it right now, and thank you! – iadvd May 21 '15 at 23:56

2 Answers2

3

Statement (2) seems to be false. $n=16269$ has no primitive root and the maximum order is $560$. $560+1$ divides $16269$ but is not prime.

I used this brute force Perl program that took about 1.5 minutes:

use ntheory ":all";
for my $n (3..100000) {
       next if znprimroot($n);
       my $m = vecmax(grep { defined $_ } map { znorder($_,$n) } 1..$n);
       next if $n % ($m+1);
       die "$n $m" unless is_prime($m+1);
}

A.P.'s answer is excellent (understanding is better than mere computation), and this means we can use my $m = carmichael_lambda($n); instead of the vecmax(...) and get the answer in a few milliseconds.

DanaJ
  • 2,999
  • 1
    Thanks, I'm flattered. I also added an explanation for why your example works. – A.P. May 21 '15 at 21:45
  • 2
    By the way: at this very moment your reputation is $561$... quite a coincidence! – A.P. May 21 '15 at 21:45
  • 1
    @A.P. haha not any more – A.J. Uppal May 21 '15 at 23:55
  • @DanaJ very cool, by the way, yesterday I installed PARI and I am on it. Both A.P. and you answer are complementary, and I really appreciate the time you used for it. I am really enjoying all this. So the Carmichael pseudo primes appeared! it is simply awesome. Now I have been able to read all the answers and basically understood all. Thanks! – iadvd May 22 '15 at 00:33
  • I wanted to say "and your answer ", cannot reedit. – iadvd May 22 '15 at 00:47
3

Statement (1) is fairly straightforward to prove once you notice that $\max_k(\text{ord}_n(k))$ is (by definition) the Carmichael function $\lambda(n)$. In particular, it is known that if $$ n = p_1^{e_1} \dotsm p_k^{e_k} $$ with $p_1,\dotsc,p_k$ distinct primes, then $$ \lambda(n) = \text{lcm}\big(\lambda(p_1^{e_1}), \dotsc , \lambda(p_k^{e_k})\big) $$ Further, we know that $\lambda(p^e) = \varphi(p^e)$ for every $p > 2$ and for $p=2, e \leq 2$, while $\lambda(2^e) = \frac{1}{2} \varphi(2^e)$ for every $e > 2$, where $\varphi$ is Euler's totient function.

In particular, observe that there are primitive roots modulo $n$ if and only if $n$ is of the form $2,4,p^e$, or $2p^e$ for some prime $p > 2$. Hence if there are no primitive roots modulo $n$ then $$n = m p^{e_p} q^{e_q}$$ for some distinct odd primes $p,q$, some integer $m$ coprime with $p$ and $q$, and $e_p,e_q \geq 1$. Since $2$ divides $\varphi(p^e)$ for every odd prime $p$, it immediately follows that $\lambda(n) \mid \frac{1}{2} \varphi(n)$.


DanaJ already pointed out a counterexample to statement (2). The error is that (2) doesn't follow from (1) and (c), independently of the truth of (c): you substituted $\lambda(n) \color{red}{=} \frac{1}{2} \varphi(n)$ in (c), but (1) merely tells you that $\lambda(n)$ divides $\frac{1}{2} \varphi(n)$.

In general it isn't true that if $k + 1 \mid n$ then $d + 1 \mid n$ as well for every divisor of $k$. For example, just think of $k = 6$ and $n = 7$.


More to the point: observe that if $n$ is square-free then $$ a \equiv a^{\lambda(n) + 1} \pmod{n} $$ for every $a \in \Bbb{Z}/a\Bbb{Z}$. Hence, if $\lambda(n)+1 \mid n$ we also have $$ a \equiv a^{\lambda(n) + 1} \pmod{\lambda(n) + 1} $$ for every $a \in \Bbb{Z}/a\Bbb{Z}$.

Now, observe that the converse of Fermat's little theorem fails to hold precisely for Carmichael numbers. Hence if there is a square-free number $n$ for which $\lambda(n) + 1$ is a Carmichael number that divides $n$, then we have a counterexample for (2). Indeed, we are not disappointed, because $561$ (as in DanaJ's example) is the first Carmichael number!

A.P.
  • 9,728
  • Nice explanation – A.J. Uppal May 21 '15 at 23:55
  • @A.P. oh, it is Carmichael function!! my knowledge is very basic so I did not know about it, I will read carefully all your explanation, but I enjoyed very much my first reading. I really appreciate the time you took for this! – iadvd May 22 '15 at 00:09
  • And the counterexample 561 exactly the first Carmichael number is like the topping of an ice cream, simply amazing! – iadvd May 22 '15 at 00:31