Integers Shared by Arithmetic Sequences

Algebra Level 4

A 1 : 2 , 9 , 16 , , 2 + ( 1000 1 ) × 7 A 2 : 3 , 12 , 21 , , 3 + ( 1000 1 ) × 9 ? \begin{array}{llllll} A_1 : & 2, & 9, & 16, \ldots , & 2 + (1000-1) \times 7 \\ A_2: & 3, & 12 , & 21, \ldots, & 3 + (1000-1) \times 9? \\ \end{array}

How many integers appear in both of the following arithmetic progressions above?

Details and assumptions

Since 2 appears in A 1 A_1 but not in A 2 A_2 , it does not appear in both of the arithmetic progressions.


The answer is 111.

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.

8 solutions

Wei Liang Gan
May 20, 2014

We note that numbers in A 1 A_1 are of the form 7 k + 2 7k+2 and numbers in A 2 A-2 are of the form 9 k + 3 9k+3 . Using the Chinese Remainder Theorem, We know that the common numbers must be of the form 63 k + 30 63k + 30 .

Considering the range of the sequences, we must have 2 63 k + 30 ( 1000 1 ) × 7 + 2 2 \leq 63k + 30 \leq (1000-1) \times 7 +2 . This gives that 0 k 110 0 \leq k \leq 110 . Thus, the total number of common numbers is 110 0 + 1 = 111 110 -0 + 1 = 111 .

did the same!

Kartik Sharma - 6 years, 8 months ago
Kunal Verma
Jun 20, 2015

General term of A 1 = 7 n 5 A_{1} \ = \ 7n \ - \ 5

A 2 A_{2} = 9 m 6 9m \ - \ 6

Thus 7 n 5 = 9 m 6 7n \ - \ 5 \ = \ 9m \ - \ 6

1 + 7 n 0 ( m o d 9 ) 1 \ + \ 7n \equiv \ 0 \ (mod \ 9 )

n n is of the form 5 + 9 k 5 \ + \ 9k

There are 111 111 such whole number k < 1000 k \ < \ 1000

Since, A 2 A_{2} can always achieve the same terms with lesser term indicators, thus the answer is 111 \boxed{111}

Calvin Lin Staff
May 13, 2014

A 1 A_1 has integers equivalent to 2 ( m o d 7 ) 2 \pmod{7} and A 2 A_2 has integers equivalent to 3 ( m o d 9 ) 3 \pmod{9} . We look for all numbers in A 1 A_1 that are equivalent to 3 ( m o d 9 ) 3 \pmod{9} which is the same as looking for numbers in A 2 A_2 equivalent to 2 ( m o d 7 ) 2\pmod{7} . Checking the first few terms of A 1 A_1 we see that 30 3 ( m o d 9 ) 30 \equiv 3\pmod{9} and this repeats every 9 9 terms. Thus the numbers of the form 30 + 63 ( k 1 ) 30 + 63(k-1) will appear in both arithmetic progressions as long as 2 30 + 63 ( k 1 ) 2 + ( 1000 1 ) × 7 1 k 111 2 \leq 30 + 63 (k-1) \leq 2 + (1000-1) \times 7 \Rightarrow 1 \leq k \leq 111 . Thus 111 111 integers appear in both arithmetic progressions.

Mayank Apte
Nov 25, 2014

Since the first common term is 30 the other common terms will be the L.C.M of A1 & A2 i.e 63. So the series of common terms is 30, 93, 156,..., nth term now Tn= a + (n-1)d = 30+ (n-1)63 now this equation should be less than (1000-1)*7 + 2 as the common terms would not exceed it Thus, 30 + (n-1)63 ≤ 6995 → (n-1)63 ≤6965 → (n-1) ≤ 6965/63 → (n-1) ≤110.5 → n ≤ 111.5 which is approx. 111
Hence the answer is 111.

series A 1 = 2 , 9 , 16 , 23 , 30 , 37 , 44 , 51 , 58 , 65 , 72 , 79 , 86 , 93 , 100 , 6995 A_1=2,9,16,23,30,37,44,51,58,65,72,79,86,93,100 \ldots , 6995 series A 2 = 3 , 12 , 21 , 30 , 39 , 48 , 57 , 66 , 75 , 84 , 93 , 102 , 8994 A_2=3,12,21,30,39,48,57,66,75,84,93,102, \ldots 8994 . If you clearly observe both series, the 5 , 14 , 5,14, \ldots terms in the series 1 are matching with the 4 , 11 , 4,11, \ldots terms in the series 2. Since the LCM for 7 and 9 is 63 (7 and 9 are the common differnces for both series),so integers in both series match after every 63 from 30.(like 93,156,219.....). This corresponds to the 5 , 14 , 23 , 32 , 41 , 5,14,23,32,41, \ldots terms of series 1. Since total terms in series 1 is 1000, the terms that match are 5 , 14 , 23.32 , 41.50 , 995 5,14,23.32,41.50, \ldots 995 , we will get 111 terms.

Pierre Pinta
Apr 28, 2016

Relevant wiki: Bezout's Identity

I referred to Bezout's identity, noticing :

  • 7 7 and 9 9 are coprimes, and

  • 2 + k × 7 = 3 + l × 9 2+k\times7=3+l\times9 can be written k × 7 l × 9 = 1 k\times7-l\times9=1 .

We know that if we find a solution ( k , l ) (k,l) , the solutions will be the couples ( k + 9 n ; l + 7 n ) (k+9n;l+7n) .

A particular solution can be easily found : ( 4 , 3 ) (4,3) since 4 × 7 3 × 9 = 1 4\times7-3\times9=1 . Then the solutions are the couples ( 4 + 9 n ; 3 + 7 n ) (4+9n;3+7n) .

As 4 + 9 n 999 4+9n\leq999 , then n 110 n\leq110 . Thus there are 111 111 solutions.

I did it this way, I think is very fast and easy to compute.

Alex Spagnoletti - 5 years, 1 month ago
Sagar Chand
May 20, 2014

5th ,14th , 23rd... terms match from A1 . Numbers of terms in A1 are 1000 except 1st term all terms match after 9 terms . so total terms that match are (1000-5)/9 = 110 (not taking remainder) + 1 term which we left in start=111

Prince Loomba
Aug 11, 2016

class MyClass {

public static void main(String[ ] args) {


int sum=0;


    for(int a=1;a<=1000;a++)


    {


       for(int b=1;b<=1000;b++){


        if(7*a-5==9*b-6){


           sum+=1; 


        } 


          } 


       }


       System.out.println(""+sum); 


    }


}

OUTPUT=111

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...