Prime Divisors Positive Difference

For a composite positive integer x x , denote by p d ( x ) pd(x) the smallest positive difference between any two prime divisors of x . x. Find the smallest possible value of p d ( x ) pd(x) for composite x x of the form x = n 100 + n 99 + + n + 1 , x=n^{100}+n^{99}+\cdots+n+1, where n n is a positive integer.

Details and assumptions

You may refer to a list of primes .

For example, since 429 = 3 × 11 × 13 429 = 3 \times 11 \times 13 , p d ( 429 ) = 13 11 = 2 pd(429) = | 13 - 11 | = 2 .


The answer is 202.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

6 solutions

Gabriel Wong
May 20, 2014

First observe that if n is congruent to 1 mod p (for some prime divisor p of x), x is then congruent to 101 mod p and thus p = 101.

Now assume that n is not congruent to 1 mod p. Observe that since x is congruent to 0 mod p, we have:

x = n^100 + n^ 99 + .... + 1 congruent to 0 mod p

(n-1)(x) = (n^101-1) is congruent to 0 mod p

n^101 is congruent to 1 mod p

Let 101 = k(p-1) + m, for a non negative integer k and 0 <= m < p-1.

Note that n^(m) is congruent to 1 mod p by Fermat's little theorem

Note that m is not 1, as that would imply n is congruent to 1 mod p. Also, since we have considered the case of p = 101, we can ignore it, and thus m is not 0 either.

Lemma: if m and p-1 are coprime, we can express every integer from 1 to p-1 in the form am + b(p-1) where a and b are integers.

Proof: Consider m, 2m, 3m ....(p-1)m. These are all distinct modulo (p-1) and must thus form the residue set (1,2,3...p-1) modulo p-1

As a result of this lemma, if m and p-1 are coprime we can express n,n^2,n^3...,n^(p-1) as the product of powers of n^m and n^(p-1). All of them will be congruent to 1 modulo p-1, a contradiction.

Thus m and p-1 have a common prime factor q.

101 = k(p-1) + m is a multiple of q and thus q is 101, thus p-1 is a multiple of 101

Observe that 102,203,304,405,506 are all not prime. Also, 607 and 809 are primes. Note that p = (101)c + 1 can only be prime if c is even, implying the minimum gap of primes of this form is 202.

Thus the valid 'candidates' for prime divisors of x are 101, and all primes congruent to 1 mod 202.

Since the gap between 101 and 607 (the smallest prime congruent to 1 mod 202) is 506, pd(x) must be at least 202. We now only need to show that there exists n s.t. x is divisible by 607 and 809 to prove that pd(x) can be 202.

Let r = s = 2 (any r and s s.t. r^6 and s^8 are not congruent to 1 mod 607 and 809 will work, but 2 is the easiest)

(r^6)^101 is congruent to 1 mod 607, (s^8)^101 is congruent to 1 mod 809

and clearly, r^6 and s^8 are not congruent to 1 mod 607 and 809.

Observe that if n is congruent to r^6 mod 607 (we can apply an identical argument for s^8 and 809)

x = 1 + n + n^2 + ...+ n^100 (n-1)x = n^101 - 1 which is a multiple of 607.

Since (n-1) is not a multiple of 607, x must be a multiple of 607.

Because 607 and 809 are coprime, by the Chinese Remainder theorem we can pick n s.t. n is congruent to r^6 mod 607 and is congruent to s^8 mod 809. The resultant x will be a multiple of both 607 and 809, completing the proof

"since we have considered the case of p = 101, we can ignore it, and thus m is not 0 either." This is both wrong and not needed

Overall, a somewhat inefficient way to show that the 101|p-1 : there is no reason to do long division first.

Calvin Lin Staff - 7 years ago
James Aaronson
May 20, 2014

Suppose that there is a prime p n 100 + . . . + 1 p \mid n^{100} + ... + 1 , so p n 101 1 n 1 p \mid \frac{n^{101}-1}{n-1} .

Suppose p ≢ 1 m o d 101 p \not\equiv 1 \mod 101 . Since 101 is prime, the function a a 101 a \mapsto a^{101} must be injective. In particular, a 1 m o d p a \equiv 1 \mod p . However, by the Lifting the Exponent lemma , p divides n 101 1 n^{101} - 1 as many times as it divides n 1 n - 1 , unless of course p = 101 p = 101 . But, as we'll see, this won't matter.

If p 1 m o d 101 p \equiv 1 \mod 101 , then by the existence of a primitive root, there exists a residue mod p such that p n 101 1 p \mid n^{101} - 1 but p n 1 p \nmid n - 1 . Since the smallest such primes are 607 and 809, then we don't need to worry about 101 having a smaller difference somewhere.

We know therefore that any difference is divisible by 101, and since both primes must be odd, 202 is the smallest possible.

Use Chinese remainder to show that there's an n which works for both 607 and 809, and we're done.

Because this solution is slightly sketchy, some explanations are in order.

1) "Since 101 is prime, the function a a 101 a \mapsto a^{101} must be injective." If a 101 b 101 ( m o d p ) , a^{101}\equiv b^{101} \pmod p, consider c a / b ( m o d p ) . c\equiv a/b \pmod p. By Fermat's theorem, c p 1 1 ( m o d p ) , c^{p-1}\equiv 1 \pmod p, and we know c 101 1 ( m o d p ) c^{101} \equiv 1 \pmod p . Because 101 101 and p 1 p-1 are coprime, we can write 1 = 101 u + ( p 1 ) v . 1=101u+(p-1)v. So c ( c 101 ) u ( c p 1 ) v 1 ( m o d p ) c\equiv (c^{101})^u\cdot (c^{p-1})^v\equiv 1 \pmod p , hence the function is injective.

2) "However, by the Lifting the Exponent lemma, p divides n 101 1 n^{101} - 1 as many times as it divides n 1 n - 1 , unless of course p = 101 p = 101 ." This is correct but unnecessarily complicated: if n 1 ( m o d p ) , n\equiv 1 \pmod p, then n 100 + . . . + 1 101 ( m o d p ) , n^{100}+...+1\equiv 101 \pmod p, so p p must be 101 101 .

All solutions revolve around the same ideas. One can actually guess the answer, using a good computer, as both 607 and 809 are factors for n=7, but this does not solve the problem.

Calvin Lin Staff - 7 years ago
Riccardo Zanotto
Dec 30, 2013

Write x = ϕ 101 ( n ) x=\phi_{101}(n) (that is, the 101-th cyclotomic polynomial). Let p p be a prime divisor of x x . First, p 2 p\neq2 . Note then that p n p\nmid n , so there exist a k = ord p ( n ) k=\text {ord}_p (n) such that n k 1 ( m o d p ) n^k\equiv1\pmod p ; but we also have that 0 x ( n 1 ) n 101 1 ( m o d p ) 0\equiv x (n-1)\equiv n^{101}-1 \pmod p , so k 101 k\mid101 ; but 101 is prime, so we can have only k = 1 , 101 k=1, 101 . If k = 1 k=1 , then n 1 ( m o d p ) n\equiv1\pmod p so we can apply LTE lemma and get v p ( n 101 1 ) = v p ( n 1 ) + v p ( 101 ) v_p (n^{101}-1)=v_p (n-1)+v_p (101) , so v p ( x ) = v p ( n 101 1 ) v p ( n 1 ) = v p ( 101 ) v_p (x)=v_p (n^{101}-1)-v_p (n-1)=v_p (101) . So one possible divisor is $ p=101 $. If k = 101 k=101 , we have th well known divisibility ord p ( a ) p 1 \text {ord}_p (a)\mid p-1 which tells us that p = 101 k + 1 p=101k+1 . From the list, the first few primes are 607, 809, etc... Now, 607 101 > 809 607 607-101> 809-607 , so since we want the smallest d p ( x ) dp (x) , we don't use 101. So d p ( x ) = 101 k + 1 ( 101 h + 1 ) = 101 ( k h ) dp (x)=101k+1-(101h+1)=101 (k-h) ; if the difference was 101, then k and h had different parity, so one of 101 k + 1 101k+1 and 101 h + 1 101h+1 would be even, but all primes are odd. So the difference is at least 202; indeed, we see that 7 101 1 7^{101}-1 is a multiple of 607 and 809, so this difference can be attained and so 202 \boxed {202} is the answer.

Suppose that there is a prime p p such that p n 100 + n 99 + + 1 p \mid n^{100}+n^{99}+----+1 . So, p ( n 101 1 n 1 ) p \mid(\frac{n^{101}-1}{n-1}) Suppose, p 1 ( m o d 101 ) p\equiv1\pmod{101} Since, 101 101 is a prime, the function a a 101 a\rightarrow a^{101} must be injective. In particulr, a 1 ( m o d p ) a\equiv1\pmod{p} . However by the Lifting The Exponent Lemma , p n 101 1 p\mid n^{101}-1 as many times at it divides n 1 n-1 , unless of course p = 101 p=101 . But, as we'll see, this won't matter. If p 1 ( m o d 1 ) 01 p \equiv 1\pmod101 then by existence of a primitive root, there exists a resudue modulo p p such that p n 101 1 p\mid n^{101}-1 but p n 1 p\nmid n-1 Since, the smallest such primes are 607 607 and 809 809 , then we don't need to worry about 101 101 having a smaller difference somewhere. We know, therefore that any difference is divisible by 101 101 , and since both the primes must be odd, 202 \boxed{202} is the smallest possible. Use Chinese Remainder Theorem to show there exists an n n which works for both 607 607 and 809 809 .

I didn't understand how do you know that 607 and 809? I mean, how did you find that 607 and 809 are the smallest primes that divide n^101 -1 but not n-1 ?

Pietro Pelliconi - 7 years, 5 months ago
Abhishek Thakur
May 20, 2014

We need to find the closest pair of 2 primes p1 and p2 such that both pi and p2 divide the no. x given for some positive integer n. We find the first few primes to be 607, 809, 1213, 3637,4243..... So the lowest difference or the pd would be 809-607=202 and this happens when n=7.

The answer was definitely guessed using computer. No explanation for why a smaller difference is impossible.

Calvin Lin Staff - 7 years ago
黎 李
May 20, 2014

therefore pd(x)>=202(it can't be 101), 607 and 809 are both primes so it's possible

It looks like only the last line of the solution got recorded.

Calvin Lin Staff - 7 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...