How many positive integers#3

How many pairs of positive integers ( x , y ) (x,y) satisfy the equation 3 x + 5 y = 1008 ? 3x+5y=1008 ?


The answer is 67.

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.

3 solutions

Mahdi Raza
Jun 24, 2020

We can see that 1008 1008 is divisible by 3 3 . Hence 3 ( 336 ) + 5 ( 0 ) = 1008 3(336) + 5(0) = 1008 is a trivial solution. 3 ( 336 5 ) + 5 ( 0 + 3 ) = 1008 3(336-5) + 5(0 +3) = 1008 is also a valid solution. We can continue to subtract 5 in the multiples of 3 and add 3 in the multiples of 5. Since the multiple of 5 will increase, we just need to count when the multiple of 3 gets negative and we can count the solutions. We can take the floor function of 336 5 \lfloor \frac{336}{5} \rfloor and we are done. This gives us 67 \boxed{67}

Razing Thunder
Jul 3, 2020
1
2
3
4
5
6
7
a=0
for x in range(1,1008):
    for y in range(1,1008):
        if 3*x + 5*y ==1008:
            a+=1
            print(x,y)
print(a)            

Chew-Seong Cheong
Jun 24, 2020

From 3 x + 5 y = 1008 3x+5y=1008 , we note that the right-hand side is divisible by 3 3 , therefore the left-hand side must also divisible by 3 3 . This means that y y must be a multiple of 3 3 . Let y = 3 z y=3z , where z z is a positive integer. Then the equation becomes.

3 x + 5 ( 3 z ) = 1008 x + 5 z = 336 z = 336 x 5 \begin{aligned} 3x + 5(3z) & = 1008 \\ x + 5z & = 336 \\ \implies z & = \frac {336-x}5 \end{aligned}

For z z to be an integer, 336 x 336-x must be divisible by 5 5 , therefore x x is of the form x = 5 n 4 x=5n - 4 , where n n is a positive integer. Then the largest n n is given by 336 ( 5 n 4 ) 0 n = 336 + 4 5 = 68 336-(5n-4) \ge 0 \implies n = \dfrac {336+4}5 = 68 . But when n = 68 n=68 , z = 0 y = 0 z=0 \implies y =0 , which is unacceptable. Therefore there are 67 \boxed{67} positive integer pair ( x , y ) (x,y) solutions.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...