0
$\begingroup$

From SMOOTH NUMBERS: COMPUTATIONAL NUMBER THEORY AND BEYOND Andrew Granville pp.13-14:

2j. Lenstra’s polynomial time test as to whether an integer that is conjecturally prime, is rigorously squarefree. If $n > 32$ ... (note that if the Generalized Riemann Hypothesis (GRH) holds and $a^{n-1} \equiv 1 \pmod{n}$ for all $a < 2 \log^2{n}$ $(*)$ then $n$ is indeed prime).

Searching the web for about 20 minutes couldn't find reference for this.

Q1 What is a reference for this claim?

Alleged counter example:

Let $k=9981$ and $n=(6k+1)(12k+1)(18k+1)=1288666276813009$.

$n$ has only three prime factors coming from the closed form form and according to Wikipedia it is Carmichael number. By the definition, the smallest $a$ s.t. $a^{n-1} \ne 1 \pmod{n}$ is $6k+1$, which is larger than the RHS of $(*)$.

Pari session:

? k=9981;n=(6*k+1)*(12*k+1)*(18*k+1)
%28 = 1288666276813009
? for(a=1,2*log(n)^2,b=Mod(a,n)^(n-1);if(b!=1,print(a)));
? \\nothing printed

Q2 What is wrong with the alleged counterexample?

Added

Voters to close are recommended to read on meta Is it frowned upon to answer a question and vote to close?

$\endgroup$
24
  • 9
    $\begingroup$ Bach's theorem says that (under GRH) if $G$ is a proper subgroup of $(\mathbb{Z}/n)^*$, there exists $a \notin G, 1 < a \le 2(\log n)^2$. If $n$ is not Carmichael $a^{n-1} \equiv 1 \pmod n$ is a proper subgroup. If you don't like that, you can use $a^{(n-1)/2}(a|n) \equiv 1 \pmod n$ (Solovay-Stassen) or complain to Granville for making a silly mistake. $\endgroup$ Commented Sep 21, 2015 at 9:38
  • 3
    $\begingroup$ To me he does not appear to quote Lenstra, the way I read it is just a side-remark (that might be imprecise). $\endgroup$
    – user9072
    Commented Sep 21, 2015 at 10:52
  • 3
    $\begingroup$ I do not quite understand; as far as I can see; the parenthetical remark is not part of the description or verification of Lenstra's algorithm. $\endgroup$
    – user9072
    Commented Sep 21, 2015 at 13:36
  • 5
    $\begingroup$ @joro: As Felipe said, Granville made a silly mistake. He is an expert on Carmichael numbers, but he is also human (errare humanum est). This question should be closed. $\endgroup$
    – GH from MO
    Commented Sep 21, 2015 at 15:32
  • 11
    $\begingroup$ This question is based on reading very literally a carelessly worded sentence from a paper. There is already a good answer pointing out what was intended. The particular questions raised here do not strike me as showing much "research effort." Therefore I am voting to close this. $\endgroup$
    – Lucia
    Commented Sep 21, 2015 at 19:17

1 Answer 1

14
$\begingroup$

This is a revised version of my original answer. I fixed some inconsistencies and made the text more readable.

The correct statement is given by the deterministic Miller-Rabin test coupled with an estimate of Bach under GRH. Let us follow Sections 10.2 and 10.5 of Shoup: A computational introduction to number theory and algebra (version 2). Let $n$ be an odd integer, and write $n-1$ as $2^st$ with $t$ odd. Consider

$$ L_n':=\left\{a\in\mathbb{Z}_n^\times:\ a^{2^s t}=1\quad\text{and}\quad a^{2^{r+1}t}=1\Longrightarrow a^{2^rt}=\pm 1\quad\text{for}\quad 0\leq r<s \right\} $$

For $n$ prime, $L_n'$ equals $\mathbb{Z}_n^\times$. For $n$ composite, the proof of Theorem 10.3 in Shoup's book shows that $L_n'$ generates a proper subgroup of $\mathbb{Z}_n^\times$. Combining these statements with Theorem 2 of Bach, we get:

Theorem 1. Assume GRH. Let $n$ be an odd integer. Then $n$ is composite if and only if there is $1<b<2\log^2 n$ such that $b$ mod $n$ lies outside $L_n'$.

Using Theorem 1.1 of Lamzouri-Li-Soundararajan in place of Bach's result, we get the following stronger version:

Theorem 2. Assume GRH. Let $n>3000$ be an odd integer. Then $n$ is composite if and only if there is $1<b<\log^2 n$ such that either $b\mid n$, or $b$ mod $n$ lies outside $L_n'$.

Added. The OP wanted more specific answers to his questions Q1 and Q2. Here they are:

Q1: The quoted paragraph without the parentheses gives a complete proof for the square-free test, so Granville's paper can be taken as a reference (although I am sure Lenstra wrote this down earlier in some form). The part in parentheses is false, so there is no reference for it. A corrected version for this part is given above, and a reference for it is Shoup's book.

Q2: There is nothing wrong with the quoted counterexample. It is a genuine counterexample to the part in parentheses, which shows in particular that the part in parentheses is false.

$\endgroup$
14
  • $\begingroup$ Thanks. But Granville quotes/interprets Lenstra's test, not yours or I am missing something? $\endgroup$
    – joro
    Commented Sep 21, 2015 at 16:20
  • 3
    $\begingroup$ @joro at the risk of repeating myself, why do you think that parenthetical statement is part of the test? To me it just complements the preceding explanatory remark that the imposed condition (not the one you quote) is unlikely to hold for non-primes as a slightly stronger one even (allegedly) characterizes primes. I think it is really just a tangential remark that came out imprecise. $\endgroup$
    – user9072
    Commented Sep 21, 2015 at 16:26
  • 3
    $\begingroup$ @joro yes you quoted it correctly, but the part you quote is not part of the test but a side-remark, that happens to be imprecise. Yet the parenthetical could just be omitted without affecting the rest. $\endgroup$
    – user9072
    Commented Sep 21, 2015 at 16:29
  • 4
    $\begingroup$ @joro what type of answer do you expect? re Q1: the claim is not correct. re Q2: nothing, as far as I can see. The answer here makes an attempt to write something similar in spirit to the incorrect side-remark; other attempts were made by Voloch. In any case it has no real bearing on the Lenstra algorithm discussed there. In that sense your initial comments make no sense to me. $\endgroup$
    – user9072
    Commented Sep 21, 2015 at 16:47
  • 2
    $\begingroup$ @joro: One more thought. Granville's paper is a summary of earlier results (or so it seems), much like a textbook. So going back to an earlier paper or book (like Koblitz) makes perfect sense. $\endgroup$
    – GH from MO
    Commented Sep 21, 2015 at 17:27

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