How many positive integers N are there, such that the number 666 when divided by N , leaves a remainder of 66?
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.
I used a similar strategy. Can you think of a more elegant strategy by which one doesn't have to actually check all the divisors?
I suppose we could look at the prime factorization 6 0 0 = 2 3 ∗ 3 ∗ 5 2 and count all the divisors less than 6 6 6 0 0 = 9 . 0 9 0 9 . . . . , which will pair with the divisors exceeding 6 6 . These are 1 , 2 , 3 , 4 , 5 , 6 and 8 for a total of 7 . We're still counting divisors but at least the numbers are smaller.
Unfortunately, you have to check all the divisors.
I was thinking of setting a similar questions, where we use "the number a 2 + a when divided by N leaves a remainder of a . This way, we are looking for the divisors of a 2 which are greater than a , and hence it is equal to ( ϕ ( a 2 ) − 1 ) / 2 . Maybe I should do that.
666 divided by N leaves remainder 66
therefore 600 should be divisible by N
The factors of N are 2,2,2,5,5,3
by the combinations of the multiplications of these nos, the nos bigger than 66 are the value of N which are
75,100,120,150,200,300,600
Looks good! Thanks!
The simplest way to solve this problem.
# Python 2.7 code
x = 0
for i in xrange(667):
if 666 % i == 66:
x = x + 1
print x
This problem does not require the use of computational aid.
Nice code, except you want to do xrange(1 , 667): because if not, you would be taking the modulo of zero, which requires dividing by 0 which is undefined, and returns and error.
Python brute force:
1 2 3 4 5 6 7 8 9 |
|
This problem does not require the use of computational aid.
Problem Loading...
Note Loading...
Set Loading...
We require that 6 6 6 ≡ 6 6 m o d N ⟹ 6 0 0 ≡ 0 m o d N ,
where by necessity N > 6 6 . Thus we are looking for the number of factors of 6 0 0 that exceed 6 6 . These are 7 5 , 1 0 0 , 1 2 0 , 1 5 0 , 2 0 0 , 3 0 0 and 6 0 0 , giving us a total of 7 positive integers.