A number theory problem by Pi Han Goh

a n = a n 1 + gcd ( n , a n 1 ) \large a_n = a_{n-1} + \gcd(n,a_{n-1})

Consider the recurrence relation above with for n 2 n\geq2 with a 1 = 7 a_1 = 7 . And define b n = a n + 1 a n b_n= a_{n+1} - a_n , find the number of composite numbers b n b_n for n 1 0 9 n\leq10^9 .

For the sake of this question, take 1 as neither prime nor composite.


The answer is 0.

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.

1 solution

Carsten Meyer
Sep 12, 2019

Before we begin, let's insert the recurrence relation for a n + 1 a_{n+1} into b n b_n to get b n = gcd ( n + 1 , a n ) , a 1 = 7 a n + 1 = a n + b n \begin{aligned} b_n&=\gcd(n+1,\:a_{n}),&&& a_1&=7\\[.5em] a_{n+1}&=a_{n}+b_n \end{aligned}

We need to prove that gcd ( . . ) \gcd(..) is either 1 1 or a prime for all n n ! However, the sequence a n a_n has no obvious symmetry or periods. It increases by (at least) one at every step because of gcd ( . . ) 1 \gcd(..)\geq 1 but that's it. Let's take a look at the first few elements of both sequences. For those values, b n b_n is not a composite number. n 1 2 3 4 5 6 7 8 9 10 11 12 13 a n 7 8 9 10 15 18 19 20 21 22 33 24 23 b n 1 1 1 5 3 1 1 1 1 11 3 1 1 \begin{array}{ r | r r r r r r r r r r r r r r} n & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & \cdots\\ \hline a_n & 7 & 8 & 9 & 10 & \red{15} & \red{18} & 19 & 20 & 21 & 22 & \red{33} & \red{24} & 23 &\\[.5em] b_n & 1 & 1 & 1 & \green{5} & \green{3} & 1 & 1 & 1 & 1 & \green{11} & \green{3} & 1 & 1 \end{array}


Notice that when a n \red{a_n} increases by more than one, it always increase to a n = 3 n \red{a_n=3n} ? And how b n > 1 \green{b_{n}>1} only around those values? Let's formalise these discoveries in the following

Proposition: The following assumptions are true: n 2 : a n { a n 1 + 1 ; 3 n } , b n { 1 , p n } for some primes p n \begin{aligned} n&\geq 2:&a_n&\in\{a_{n-1}+1;\:3n\},&&&&&b_n&\in\{1,\:p_n\}&\text{for some primes }p_n \end{aligned}

Before we begin the proof, let's recall a useful property of the gcd we will use quite a few times: gcd ( x , y ) = gcd ( x , m x + y ) = gcd ( x , m x y ) , x , y , m Z ( ) \begin{aligned} \gcd(x,\:y)&=\gcd(x,\:mx+y)=\gcd(x,\:mx-y),&&x,\:y,\:m\in\mathbb{Z}&&&&(*) \end{aligned}

Proof: We prove both statements by one induction. Looking at the table, they are true until a n = 3 n a_n=3n (e.g. at n = 5 n=5 ). Let's see what happens to b n b_n at this step: b n = gcd ( n + 1 , 3 n ) = ( ) gcd ( n + 1 , 3 ) { 1 ; 3 } a n + 1 = 3 n + b n { a n + 1 ; 3 n + 3 } \begin{aligned} b_n&=\gcd(n+1,\:3n)\underset{(*)}=\gcd(n+1,\:3)\in\{1;\:3\}&\Rightarrow&& a_{n+1}&=3n+b_n\in\{a_n+1;\:3n+3\} \end{aligned} If b n = 3 b_n=3 , we are done. Otherwise, let 1 i 1\leq i be the number of iterations such that b n b_n equals one: b n = = b n + i 1 = 1 , b n + i > 1 , a n = 3 n a n + j = 3 n + j , 1 j i \begin{aligned} b_{n}&=\ldots=b_{n+i-1}=1,&b_{n+i}&>1,&&&&&a_n&=3n&\Rightarrow&&a_{n+j}=3n+j,&&&&1\leq j \leq i \end{aligned} b n + j 1 = gcd ( n + j , 3 n + j 1 ) = ( ) gcd ( n + j , 2 n 1 ) = 1 , 1 j i \begin{aligned} \Rightarrow&&b_{n+j-1}&=\gcd(n+j,\:3n+j-1)\underset{(*)}{=}\gcd(n+j,\:2n-1)=1,&&&& 1\leq j\leq i \end{aligned} We notice that 2 n 1 2n-1 is coprime to i i consecutive integers. Then it cannot have any factor 1 < q i 1<q\leq i , because one of those consecutive integers would be a multiple of q q and thus not be coprime to 2 n 1 2n-1 : gcd ( n + j , 2 n 1 ) = 1 , 1 j i gcd ( q , 2 n 1 ) = 1 , 1 < q i \begin{aligned} \gcd(n+j,\:2n-1)&=1,&1&\leq j\leq i&\Rightarrow && \gcd(q,\:2n-1)&=1,&1&<q\leq i \end{aligned}

Consider the values b n + i > 1 b_{n+i}>1 can take. As a factor of 2 n 1 2n-1 , it also cannot have any odd factor 1 < q i 1<q\leq i : b n + i = gcd ( n + i + 1 , 2 n 1 ) = ( ) gcd ( n + i + 1 , 2 i + 3 ) 2 i + 3 \begin{aligned} b_{n+i}&=\gcd(n+i+1,\:2n-1)\underset{(*)}{=}\gcd(n+i+1,\:2i+3)\leq 2i+3 \end{aligned} But b n + i b_{n+i} also has no more than one odd factor q > i q>i - if it had, we get a contradiction: p , q > i 1 odd p q 3 ( i + 1 ) > 2 i + 3 b n + i p q ( ) \begin{aligned} p,\:q&>i\geq1\text{ odd}&\Rightarrow&& pq\geq 3(i+1)>2i+3\geq b_{n+i}\neq pq&&(**) \end{aligned} We have shown that b n + i b_{n+i} has no factor 1 < q i 1< q\leq i and (at most) one factor q > i q>i , so it can be only one or an odd prime! Using the same argument as in ( ) (**) , we find b n + i = 2 i + 3 b_{n+i}=2i+3 and a n + i + 1 = 3 ( n + i + 1 ) a_{n+i+1}=3(n+i+1)\quad\square

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...