Basic counting methods — integers between 1 and 100 that are divisible by 7

  • Thread starter stunner5000pt
  • Start date
  • Tags
    Counting
  • #1
stunner5000pt
1,463
3
Homework Statement
Pick two integers between 1 to 100 (inclusive) whose product is divisible by 7. No repetition allowed
Determine the number of numbers that may be formed this way
Relevant Equations
Basic counting methods
There are 14 integers between 1 to 100 that are divisible by 7

If we used indirect approach, then we would do the total number of possibilities C(100,2) = 4,950
and subtract all nubmers that are indivisible by 7 : C(100-14, 2) = C(86,2) = 3,655

the difference of these two numbers is 4,950 - 3,655 = 1,295

Is this the right answer?

Your insight is greatly appreciated!
 
Last edited:
Physics news on Phys.org
  • #2
stunner5000pt said:
Homework Statement: Pick two integers between 1 to 100 (inclusive) whose product is divisible by 7. No repetition allowed
Relevant Equations: Basic counting methods

Is this the right answer?
Kind of depends on the question -- which you forgot to mention ?

##\ ##
 
  • #3
stunner5000pt said:
Homework Statement: Pick two integers between 1 to 100 (inclusive) whose product is divisible by 7. No repetition allowed
Relevant Equations: Basic counting methods

There are 14 integers between 1 to 100 that are divisible by 7

If we used indirect approach, then we would do the total number of possibilities C(100,2) = 4,950
If the product is divisible by 7, then at least one of the numbers must be divisible by 7. As you said, there are 14 integers in the interval [1 ... 100] that are multiples of 7. You don't want C(100, 2) since you're not going to pick just any 2 numbers out of the 100 of them.
The condition that "No repetition allowed" likely means that we shouldn't count 7 * 7, 14 * 14, and so on.
 
  • #4
BvU said:
Kind of depends on the question -- which you forgot to mention ?

##\ ##
Sorry about this. Added that question as well

Further to Mark44's comment, the answer I got still seems to be double counting the 7x7, 14x14, and so on

Is it as simple as dividing the result by two ?
 
  • #5
stunner5000pt said:
1 Sorry about this. Added that question as well

2 Further to Mark44's comment, the answer I got still seems to be double counting the 7x7, 14x14, and so on

3 Is it as simple as dividing the result by two ?
1 makes my post#2 look dumb :frown:

2 Which is what he says:
Mark44 said:
The condition that "No repetition allowed" likely means that we shouldn't count 7 * 7, 14 * 14, and so on.

3 What result ?

Furthermore, you should also decide if for example, the pair 8,7 is the same as the pair 7,8

##\ ##
 
  • #6
Maybe you can split into two cases for the product ab; when they're both divisible by 7, and when only one is. They're disjoint, i.e., they don't overlap.
The statement Mark44 made generalizes to primes. If p is a prime and p|ab , then p|a or p|b.
 
  • #7
stunner5000pt said:
Homework Statement: Pick two integers between 1 to 100 (inclusive) whose product is divisible by 7. No repetition allowed
Determine the number of numbers that may be formed this way
Relevant Equations: Basic counting methods

There are 14 integers between 1 to 100 that are divisible by 7

If we used indirect approach, then we would do the total number of possibilities C(100,2) = 4,950
and subtract all numbers' that are indivisible by 7 : C(100-14, 2) = C(86,2) = 3,655

the difference of these two numbers is 4,950 - 3,655 = 1,295

Is this the right answer?

Your insight is greatly appreciated!
I get the same answer as you got, but used a different method of counting.

Also, I assumed, for example, that the pair 7,8 is the same as the pair 8,7. Furthermore, I only considered integers in each pair to be distinct, not allowing pairs such as 7,7 or 98,98 .
 
  • #8
I got 1,295 too:
C(14,2) =91 ways of having both being multiples of 7, + 86(14) =1204 ways of having exactly one being a multiple of 7=1,295.
 
  • #9
So, on a checkers board with 104 fields, there are 14 rows and 14 columns that satisfy "product divisible by 7". You can paint them yellow, and when you're done you have painted 2800 - 14*14 = 2604 fields. To avoid repetition, you don't paint the 14 diagonal fields.

Right answer is 2590 :biggrin:

##\ ##
 
  • #10
stunner5000pt said:
Homework Statement: Pick two integers between 1 to 100 (inclusive) whose product is divisible by 7. No repetition allowed
Determine the number of numbers that may be formed this way
I interpret this as the number of distinct final products. There are far fewer of those than the results of the combinatorial calculations above. As most final products can be generated in several ways.
 
  • #11
Why make things simple, eh ?
 
  • #12
PeroK said:
I interpret this as the number of distinct final products. There are far fewer of those than the results of the combinatorial calculations above. As most final products can be generated in several ways.
Well, yes, if you insist on actually reading what the problem states and complying with that.

o:)

This will require some clever analysis of possible prime factors.
 
Last edited:
  • #13
BvU said:
So, on a checkers board with 104 fields, there are 14 rows and 14 columns that satisfy "product divisible by 7". You can paint them yellow, and when you're done you have painted 2800 - 14*14 = 2604 fields. To avoid repetition, you don't paint the 14 diagonal fields.

Right answer is 2590 :biggrin:

##\ ##
So either some of us, who arrived at the result of 1,295 half-counted , or you double-counted.
I had this idea of counting all multiples of 7 up to some amount, as the set of products pq, where at least one of p,q , is divisible by 7.
 
  • #14
stunner5000pt said:
Homework Statement: Pick two integers between 1 to 100 (inclusive) whose product is divisible by 7. No repetition allowed
Determine the number of numbers that may be formed this way
Relevant Equations: Basic counting methods

There are 14 integers between 1 to 100 that are divisible by 7

If we used indirect approach, then we would do the total number of possibilities C(100,2) = 4,950
and subtract all nubmers that are indivisible by 7 : C(100-14, 2) = C(86,2) = 3,655

the difference of these two numbers is 4,950 - 3,655 = 1,295

Is this the right answer?

Your insight is greatly appreciated!
Still, as @PeroK mentioned, if I understood correctly( please correct me if I misunderstood) , would you consider 98=14(7)=49(2) as different numbers obtained as products?
If they're considered different, it seems you may have to use the likes of the Euler Phi function.
 
  • #15
WWGD said:
So either some of us, who arrived at the result of 1,295 half-counted , or you double-counted.

It's a matter of choice; I found the problem statement ambiguous at best.
BvU said:
Furthermore, you should also decide if for example, the pair 8,7 is the same as the pair 7,8
 
  • Like
Likes WWGD
  • #16
stunner5000pt said:
Homework Statement: Pick two integers between 1 to 100 (inclusive) whose product is divisible by 7. No repetition allowed
Determine the number of numbers that may be formed this way.

Relevant Equations: Basic counting methods

Your insight is greatly appreciated!
I think it's pretty clear that @PeroK's interpretation of the problem is probably what was intended.

As he pointed out in Post#10:
PeroK said:
I interpret this as the number of distinct final products.
There are far fewer of those than the results of the combinatorial calculations above. As most final products can be generated in several ways.

For example the product of 21 and 84, which is 1,764, also results from multiplying other pairs of integers between 1 to 100 (inclusive).

Those pairs are: {28, 63}, {18, 98}, {36, 49}, and maybe {42, 42} .

So, if counting distinct products is what is intended, then these several pairs taken together all count as giving one single product.
 
  • #17
SammyS said:
I think it's pretty clear that @PeroK's interpretation of the problem is probably what was intended.

As he pointed out in Post#10:For example the product of 21 and 84, which is 1,764, also results from multiplying other pairs of integers between 1 to 100 (inclusive).

Those pairs are: {28, 63}, {18, 98}, {36, 49}, and maybe {42, 42} .

So, if counting distinct products is what is intended, then these several pairs taken together all count as giving one single product.
And I think something like the Euler Phi function will be involved.
 
  • #18
stunner5000pt said:
the difference of these two numbers is 4,950 - 3,655 = 1,295

Is this the right answer?
No: for instance you have counted the number 42 three times (2 x 21, 3 x 14, 6 x 7). The correct answer is a little more than half of 1,295.

BvU said:
Right answer is 2590 :biggrin:
And you have counted 42 six times (2 x 21, 3 x 14, 6 x 7, 7 x 6, 14 x 3, 21 x 2).

I don't think there is a quick way to find the answer manually, but generating a list without duplicates is something that computers are good at doing.
 
  • Like
Likes SammyS
  • #19
pbuk said:
I don't think there is a quick way to find the answer manually, but generating a list without duplicates is something that computers are good at doing.
Generating your list without duplicates looks more reasonable than trying to use some system of looking at unique prime factorizations to look for and eliminate duplicates.

Also, notice that missing from your lists is 1×42 .
 
  • Like
Likes pbuk and BvU
  • #20
SammyS said:
Also, notice that missing from your lists is 1×42 .
Yes, this illustrates well the difficulty of getting things like this right by hand - even if you have 50 years experience of problem solving it is easy to miss obvious things.

But half a dozen lines of code in your favourite programming language gets the right answer straight away.
 
  • Like
Likes PeroK

FAQ: Basic counting methods — integers between 1 and 100 that are divisible by 7

How many integers between 1 and 100 are divisible by 7?

There are 14 integers between 1 and 100 that are divisible by 7. These integers are found by dividing 100 by 7 and taking the floor of the result, which gives us 14.

What is the smallest integer between 1 and 100 that is divisible by 7?

The smallest integer between 1 and 100 that is divisible by 7 is 7 itself.

What is the largest integer between 1 and 100 that is divisible by 7?

The largest integer between 1 and 100 that is divisible by 7 is 98. This is because 98 is the highest multiple of 7 that is less than or equal to 100.

How can I find the integers between 1 and 100 that are divisible by 7?

To find the integers between 1 and 100 that are divisible by 7, you can start with the smallest multiple of 7, which is 7, and keep adding 7 until you reach or exceed 100. The sequence is: 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, and 98.

What is the sum of all integers between 1 and 100 that are divisible by 7?

The sum of all integers between 1 and 100 that are divisible by 7 can be calculated by summing the sequence 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, and 98. The sum is 735.

Back
Top