Let us denote by a∣b when a positive integer a divides b. We write pc∤n when a positive integer n is a multiple of pc, but not of pc+1 for a prime p.
Lemma 1. For a given prime q and a positive integer a such that (a,q)=1, let s be the smallest positive integer x satisfying q∣as−1. Any positive integer y such that q∣ay−1 must be a multiple of s.
*Proof.* Put y=qs+r0, where q,r0 are integers and 0≤r0<s. Noting q∣ay−1=(as−1)(ay−s+ay−2s+⋯+ar0)+ar0−1 leads us to q∣ar0−1. By the minimality of s, we get r0=0. □
1. The case of p=2
It is immediate to note that all nis are odd and greater than or equal to 3. Let q(≥3) be the smallest prime dividing one of n1,n2,…,nk. Without loss of generality, we assume q∣n2. Let s≥2 be the smallest positive integer x satisfying q∣2r−1. Then by Fermat's little theorem and Lemma 1, we get s∣q−1. Thus s<q. We realize that s has a smaller prime factor than q, so it contradicts q∣2n1−1, which implies s∣n1. We conclude that there does not exist (n1,n2,…,nk) fulfilling conditions, hence 2 is not a nice prime.
2. The case of prime p≥3
(1) In the case k=1: we prove that there does not exist a positive integer n such that n∣pn−1 and (npn−1,n)=1.
First, under the condition n∣pn−1, we show the smallest prime factor q1 of n must divide p−1. Let n=q1e1⋯qrer, q1<⋯<qr. n∣pn−1 implies q1∣pn−1. Let s be the smallest positive integer x such that q1∣px−1. Then it is obvious that s≤q1−1 and s∣n. If s>1, s is a product of primes smaller than q1, it violates that n cannot have smaller prime factors than q1. We obtain s=1 so q1∣p−1.
Now let n=q1e1n0. In the expression pn−1=pq1e1n0−1=(pn0−1)∏j=0e1−1pq1j−1n0−1pq1jn0−1. We easily see the number of prime q1 in pn−1 is at least e1+1. So we get q1∣(npn−1,n) reducing to contradiction. In sum, for any given prime p, there does not exist a positive integer n satisfying all conditions when k=1.
(2) In the case k≥2: we are always able to find sequences of positive integers (n1,n2,…,nk) for infinitely many k. This proves that any odd primes are nice. There are various ways of taking the sequences and the proposed way below is one of them.
Lemma 2. For a positive integer c and a prime q, qc∣p−1 implies qc+d∣pqd−1. Moreover,
- When q is odd or (q=2,c≥2): the smallest positive integer x such that qc+d∣px−1 is qd and qc+d∣∣pqd−1 holds.
- When (q=2,c=1): Let c′ be the smallest positive integer such that 2c′∣∣p2−1. Then the smallest positive integer x satisfying 2c′−d∣∣px−1 is 2d+1 and 2c′+d∣∣p2d+1−1 holds.
Proof. Let us show only the first case. When d=0, it is true by definition. Let us assume the statement is true when d=d0 and try to show when d=d0+1. We need to find the smallest positive integer x such that qc+d0+1∣∣px−1. Since qc+d0∣∣px−1 also holds, by the assumption, x is a multiple of qd0 and we set x=qd0u. From the equation px−1=pqd0u−1=(pqd0−1)(p(u−1)qd0+p(u−2)qd0+⋯+1), pqd0−1 is already a multiple of qc+d0, so it is enough to have p(u−1)qd0+p(u−2)qd0+⋯+1 a multiple of q. p(u−1)qd0+p(u−2)qd0+⋯+1≡1+⋯+1≡u(modq) implies q∤u and conversely, we easily check px−1 is really a multiple of qc+d0+1 when q divides u. Thus x=qd0u is a multiple of qd0+1.
On the other hand, pqd0−1pqd0−1=p(q−1)qd0+p(q−2)qd0+⋯+1 is only a multiple of q not of q2, whose proof is presented below. In conclusion, we obtain qc+d∣∣pqd−1 by induction.
The reason for q∣∣p(q−1)qd0+p(q−2)qd0+⋯+1: Let v be a positive integer such that pqd0=1+qv. Then, p(q−1)qd0+p(q−2)qd0+⋯+1=(1+qv)q−1+(1+qv)q−2+⋯+(1+qv)+1≡1+(q−1)qv+1+(q−2)qv+⋯+(1+qv)+1=q+2(q−1)q2v≡q(modq2).
In the case (q=2,c=1), we are not able to guarantee the term 2(q−1)q2v in the almost last equation is a multiple of q2 so we separate the case. □
Now we define S={q∣q a prime dividing p−1} and let q∈S. Take n1=p−1 and let cq,1 be an integer such that qcq,1∣∣p−1 for q∈S. Similarly, we define cq,2 as an integer satisfying qcq,2∣∣pn1−1=pn1−1−1. Inductively for q∈S,i≥1, let cq,i+1 be an integer such that qcq,i+1∣∣pni−1 and ni+1:=∏q∈Sqcq,i+1.
We define cq,i and ni in this way accordingly as i gets increased one by one, then we notice that cq,i also gets large as i does so. Fix q0∈S and put c:=cq0,1. (When q0=2,cq0,1=1, let c=c′−1, where c′ is in Lemma 2.(ii).)
Since there exists an integer i such that q0cq0,i>p−1, we call such i i0. Moreover, there exists a positive integer k0 such that (p−1)q0k0pk0−1≥2p+1, which is justified by that the left hand side is a function divergent when k0 goes to infinity. Now let k be any integer greater than 1+max{i0,k0,3}. Except the case q0=2,cq0,1=1, we can, in fact, define k to be any integer greater than max{i0,k0,3}. We apply the above definition of cq,i+1 and ni+1 till i<k−2 and let nk−1:=q0cq0,k−1. It is easy to observe nk−1≥p−1≥2p−1.
From our choices of sequences {ni}, it is clear to verify the following for 1≤i<k−1
−1,n1=p−1≥2p+1,ni+1=p−1≥2p+1
−2,ni+1∣pni−1,(ni−1pni−1,ni+1)=1
The first one comes from cq,i+1>cq,i≥1. From Lemma 2, we even know cq,i+1=cq,i+cq,i holds when q is odd or cq,i≥2.
Finally, let nk:=q0cq0,k−1∏q∈Sqcq,qpnk−1=q0cq0,k−1(p−1)pnk−1, then (nk,q0)=1 follows from Lemma 2, hence it satisfies the second condition (nk,nkpnk−1)=1 for nk.
We also obtain the first condition nk≥2p+1 from (p−1)q0cq0,k−1pnk−1≥2p+1. Noting (p−1,p−1pnk−1)=(p−1,nk) for this nk and (q,nk)=1 for q∈S, we establish (p−1,nk)=1. □