Greatest common divisors in a sequence

Consider the sequence of integers given by a n = n ! + 100 a_n = n! + 100 for n 1 n \geq 1 . What is the maximum value of gcd ( a n , a n + 1 ) \gcd( a_n, a_{n+1} ) ?


The answer is 100.

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.

2 solutions

Russell Few
Sep 8, 2013

We first evaluate a n a_n and a n + 1 a_{n+1} . a n = n ! + 100 a_n=n!+100 , and a n + 1 = ( n + 1 ) ! + 100 a_{n+1}=(n+1)!+100

g c d ( a n , a n + 1 ) gcd(a_n, a_{n+1}) = g c d ( n ! + 100 , ( n + 1 ) ! + 100 ) =gcd(n!+100, (n+1)!+100) = g c d ( n ! + 100 , ( ( n + 1 ) ! + 100 ) ( n + 1 ) ( n ! + 100 ) ) =gcd(n!+100, ((n+1)!+100)-(n+1)(n!+100)) = g c d ( n ! + 100 , 100 n ) = g c d ( n ! + 100 , 100 n ) =gcd(n!+100, -100n)=gcd(n!+100, 100n) .

Lemma 1 1 : g c d ( n ! + 100 , 100 n ) gcd(n!+100, 100n) is not divisible by any other prime aside from 2 2 and 5 5 .

Suppose that 100 n 100n is divisible by any prime other than 2 2 and 5 5 . That implies that n n is divisible by that prime, because 100 100 would be relatively prime to that prime. Thus n ! n! would also be divisible by that prime, and n ! + 100 n!+100 would not be divisible by it.

Hence it is not possible for both n ! + 100 n!+100 and 100 n 100n to be divisible by a prime other than 2 2 or 5 5 .

Lemma 2 2 : g c d ( n ! + 100 , 100 n ) gcd(n!+100, 100n) is not divisible by 2 3 = 8 2^3=8 .

We first consider n 1 , 2 , 3 , 4 , 5 n \in {1, 2, 3, 4, 5} .

If n 1 , 3 , 5 n \in {1, 3, 5} , then 100 n 100n will not be divisible by 8 8 , because the highest power of 2 2 divisible by 100 n 100n will be 4 4 .

If n = 2 n=2 , then n ! + 100 = 2 + 100 = 102 n!+100=2+100=102 , which is not divisible by 8 8 .

If n = 4 n=4 , then n ! + 100 = 24 + 100 = 124 n!+100=24+100=124 , which is not divisible by 8 8 .

Now consider the cases where n 6 n \ge 6 .

Then n ! n! will be divisible by 8 8 . However, 100 100 is not, so n ! + 100 n!+100 will not be divisible by 8 8 .

n ! + 100 n!+100 and 100 n 100n could not be both divisible by 8 8 .

Thus for all n n , g c d ( n ! + 100 , 100 n ) gcd(n!+100, 100n) is not divisible by 8 8 .

Lemma 3 3 : g c d ( n ! + 100 , 100 n ) gcd(n!+100, 100n) is not divisible by 5 3 = 125 5^3=125

We first consider n { 1 , 2 , . . . , 14 } { 5 , 10 } n \in \{1, 2, ..., 14\} \setminus \{5, 10\} , 100 n 100n is not divisible by 125 125 , because the highest power of 5 5 divisible by 100 n 100n will be 25 25 .

If n = 5 n=5 , then 5 ! + 100 = 120 + 100 = 220 5!+100=120+100=220 , which is not divisible by 125 125 .

If n = 10 n=10 , then 10 ! + 100 = 3628800 + 100 = 3629900 10!+100=3628800+100=3629900 , which is not divisible by 125 125 .

If n 15 n \ge 15 , then n ! n! will be divisible by 125 125 . However, 100 100 is not, so n ! + 100 n!+100 will not be divisible by 125 125 .

n ! + 100 n!+100 and 100 n 100n could not be both divisible by 125 125 .

Thus for all n n , g c d ( n ! + 100 , 100 n ) gcd(n!+100, 100n) is not divisible by 125 125 .

Hence the maximum possible GCD is 2 2 5 2 = 100 2^2 \cdot 5^2=100 .

We would show that this is achievable.

If we let n = 10 n=10 , then a n = 10 ! + 100 a_n=10!+100 , which is divisible by 100 100 as both 10 ! 10! and 100 100 are divisible by 100 100 . Also, a n + 1 = 11 ! + 100 a_{n+1}=11!+100 , which is also divisible by 100 100 as both 11 ! 11! and 100 100 are divisible by 100 100

Hence g c d ( a n , a n + 1 ) gcd(a_n, a_{n+1}) is divisible by 100 100 .

Thus, the maximum possible value of g c d ( a n , a n + 1 ) gcd(a_n, a_{n+1}) is 100 \boxed{100} .

Moderator note:

Nicely done!

Why is it necessary that gcd ( n ! + 100 , ( n + 1 ) ! + 100 ) \gcd(n!+100,(n+1)!+100) = gcd ( n ! + 100 , ( ( n + 1 ) ! + 100 ) ( n + 1 ) ( n ! + 100 ) ) = \gcd(n!+100,((n+1)!+100)-(n+1)(n!+100)) ?

Matt Kempster - 7 years, 9 months ago

Log in to reply

For any integers a , b , c a,b,c it is true that g c d ( a , b ) = g c d ( a , b + a c ) . gcd(a,b)=gcd(a,b+ac). (Hint: b = ( b + a c ) a c b=(b+ac)-ac ).

Alexander Borisov - 7 years, 9 months ago

i think m a x ( g c d ( n ! + x , ( n + 1 ) ! + x ) ) max(gcd(n! + x, (n+1)! + x )) is just x x , i tried it with many integers x 2 x \geq 2 .

from my observations : m a x ( g c d ( n ! + x , ( n + 1 ) ! + x ) ) = x max(gcd(n! + x, (n+1)! + x )) = x when n ! n! contains all x x primes factors and there exponents is great or equals to exponents of factorized x x primes:

let x = p 1 e 1 p 2 e 2 p 3 e 3 . . . p i e k x = p_{1}^{e_1}p_{2}^{e_2}p_{3}^{e_3}...p_{i}^{e_k} ( i , k N ) (i,k \in \mathbb{N})

and

n ! = p 1 d 1 p 2 d 2 p 3 d 3 . . . p i d k m n! = p_{1}^{d_1}p_{2}^{d_2}p_{3}^{d_3}...p_{i}^{d_k} * m ( i , j , m N (i,j,m \in \mathbb{N} ) and for every j , e j d j j, e_j \leq d_j
and m m is multiple of other prime factors of n ! n!

also ( n + 1 ) ! = p 1 d 1 p 2 d 2 p 3 d 3 . . . p i d k m (n + 1)! = p_{1}^{d_1}p_{2}^{d_2}p_{3}^{d_3}...p_{i}^{d_k} * m' ( i , j , m N (i,j,m' \in \mathbb{N} ) and for every j , e j d j j, e_j \leq d_j
and m m' is multiple of other prime factors of ( n + 1 ) ! (n + 1)!

so:

m a x ( g c d ( n ! + x , x ) ) max(gcd(n! + x, x ))

= m a x ( g c d ( x m + x , x ) ) = max(gcd(x * m + x, x ))

= m a x ( g c d ( x ( m + 1 ) , x ) ) = max(gcd(x * (m + 1), x ))

= x = x

and same for ( n + 1 ) ! (n+1)! :

m a x ( g c d ( ( n + 1 ) ! + x , x ) ) = x max(gcd((n + 1)! + x, x )) = x

then finally:

m a x ( g c d ( n ! + x , ( n + 1 ) ! + x ) ) = x max(gcd(n! + x, (n+1)! + x )) = x

i used http://www.wolframalpha.com/ for calculations

ADRABI Abderrahim - 7 years, 9 months ago

Log in to reply

This is probably true for many x , x, but definitely not for all: if x = 8 , x=8, then g . c . d . g.c.d. can be as large as 32 32 (for n = 4 n=4 ). It would be very interesting (but possibly very hard) to figure out all x x for which it is true.

Alexander Borisov - 7 years, 9 months ago

Very nice!

The solution had to be edited a bit for LaTeX. For the future: the command for { \{ is \ { \backslash\{ (and similar for } \} ). The difference of sets is \ \backslash setminus or \ \backslash backslash.

Alexander Borisov - 7 years, 9 months ago

May I ask if there is any way I could possible simplify my solution? It just seems too long if it would be written by hand...

Russell FEW - 7 years, 9 months ago
Mani Jha
Sep 11, 2013

We can see that for the starting terms of the sequence, the gcd of two adjacent integers is 2,4 etc. We can infer that the maximum value of gcd must occur in the higher terms of the sequence.

10 ! 10! and all other factorials after that contain a minimum of two zeroes at the end. Because 10 ! 10! contains the product : 10 X 5 X 2 10X5X2 and so do all the higher factorials. Now, when you add 100 to a factorial containing a minimum of two zeroes, the result contains exactly two zeroes.

For example, 40500000 + 100 = 40500100 40500000+100=40500100

And so, you can check for numbers containing any number of zeroes. Now, it is clear that the later terms of the sequence will have only two zeroes at their end. So, the Greatest common divisor of two numbers ending with 2 zeroes only is 100 .

This is an intuitively reasonable argument, but it is not rigorous. In particular, it is not justified or even rigorously stated that the maximum gcd is in the higher terms. It is also not proven that the gcd does not contain extra factors, like 3 or 257...

Alexander Borisov - 7 years, 9 months ago

Log in to reply

Ya, you're right. I missed a few points. But it is intuitive that the highest g.c.d will occur after the 10th term. Because it is the first term to contain two zeroes, and so the g.c.d of any two terms after the 10th term will be a minimum of 100. This is not the case for the first 9 terms.

Mani Jha - 7 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...