How many integers between 0 and 1560 have a prime tens digit and a prime units digit.
A) 295
B) 252 OA
C) 236
D) 96
E) 76
I was able to solve this question by two methods.
First is through permutations, I am getting 232 as the answer. Took me less than 1 minute to solve this way.
Second, finding the pattern in counting the numbers from 1560. But that is very time consuming, took me around 3-4 minutes.
While posting the answers, kindly post the time it took you to solve and the explanation.
Thanks.
Prime Numbers
This topic has expert replies
-
- Legendary Member
- Posts: 1153
- Joined: Wed Jun 20, 2007 6:21 am
- Thanked: 146 times
- Followed by:2 members
-
- Legendary Member
- Posts: 661
- Joined: Tue Jul 08, 2008 12:58 pm
- Location: France
- Thanked: 48 times
Well, it depends on how you work, I chose the pattern and it was pretty fast, less 1', and with less error probability in my case. The only point is that I took 1 into account so it was wrong but the pattern was ok. The answer was noth there so it took me more time to correct it. Hope it helps even if I was wrong.
-
- Master | Next Rank: 500 Posts
- Posts: 139
- Joined: Wed May 07, 2008 12:27 pm
- Thanked: 8 times
Isn't 252 the right answer
between 1- 100 = 16 numbers
between 100 - 1000 = 16 * 9 = 144 numbers
between 1000 - 1500 = 80 numbers
between 1500 - 1560 = 12 numbers
16 + 144 + 80 + 12 = 252
Am I doing something wrong?
How would you do this using permutations?
-A
between 1- 100 = 16 numbers
between 100 - 1000 = 16 * 9 = 144 numbers
between 1000 - 1500 = 80 numbers
between 1500 - 1560 = 12 numbers
16 + 144 + 80 + 12 = 252
Am I doing something wrong?
How would you do this using permutations?
-A
-
- Legendary Member
- Posts: 1153
- Joined: Wed Jun 20, 2007 6:21 am
- Thanked: 146 times
- Followed by:2 members
No you are not doing anything wrong, your answer is perfect.
I also did it by the same method but took me more than 3 minutes.
Now permutation method.
0,1,2,3,4,5,6,7,8,9
We have 4 primes numbers (2,3,5,7)
For two digits number 4*4 = 16
For three digits number 9*4*4 =144
For Four digits the number cannot exceed 1560
Therefore, 1*6*3*4 = 72
1 because first digit cannot have more than 1 options (1)
6 because second digit cannot have more than 6 options (0,1,2,3,4,5)
3 because third digit cannot have more than 3 prime number (2,3,5)
4 because we can have all the prime numbers.
16+144+72=232
Let me know if I am doing something wrong.
Thanks,
I also did it by the same method but took me more than 3 minutes.
Now permutation method.
0,1,2,3,4,5,6,7,8,9
We have 4 primes numbers (2,3,5,7)
For two digits number 4*4 = 16
For three digits number 9*4*4 =144
For Four digits the number cannot exceed 1560
Therefore, 1*6*3*4 = 72
1 because first digit cannot have more than 1 options (1)
6 because second digit cannot have more than 6 options (0,1,2,3,4,5)
3 because third digit cannot have more than 3 prime number (2,3,5)
4 because we can have all the prime numbers.
16+144+72=232
Let me know if I am doing something wrong.
Thanks,
Last edited by parallel_chase on Fri Jul 25, 2008 3:23 pm, edited 1 time in total.
-
- Master | Next Rank: 500 Posts
- Posts: 118
- Joined: Sun Jun 01, 2008 1:47 pm
- Thanked: 5 times
- Followed by:1 members
I have done this way:
Since we need a only tens and units digit to be prime, we just need combinations of 2,3,5 and 7 starting from 10 till 1560.So it is pretty much clear that for every 100 numbers (starting from 0 to 100) we will have same number of combinations.So for first 100 numbers(0 to 100) we have 2^4 combinations i.e 16.
for all 15 such calculations(till 1500) we have 15*16 = 240 combinations.
In last 60 we have 12 prime number combnations.
Total = 240 + 12 = 254
or
?
Since we need a only tens and units digit to be prime, we just need combinations of 2,3,5 and 7 starting from 10 till 1560.So it is pretty much clear that for every 100 numbers (starting from 0 to 100) we will have same number of combinations.So for first 100 numbers(0 to 100) we have 2^4 combinations i.e 16.
for all 15 such calculations(till 1500) we have 15*16 = 240 combinations.
In last 60 we have 12 prime number combnations.
Total = 240 + 12 = 254
![Very Happy :D](./images/smilies/grin.png)
![Shocked :shock:](./images/smilies/shocked.png)
-
- Legendary Member
- Posts: 1153
- Joined: Wed Jun 20, 2007 6:21 am
- Thanked: 146 times
- Followed by:2 members
ricky wrote:I have done this way:
Since we need a only tens and units digit to be prime, we just need combinations of 2,3,5 and 7 starting from 10 till 1560.So it is pretty much clear that for every 100 numbers (starting from 0 to 100) we will have same number of combinations.So for first 100 numbers(0 to 100) we have 2^4 combinations i.e 16.
for all 15 such calculations(till 1500) we have 15*16 = 240 combinations.
In last 60 we have 12 prime number combnations.
Total = 240 + 12 = 254
or
?
Nicely Done!!!
You calculatedparallel_chase wrote:No you are not doing anything wrong, your answer is perfect.
I also did it by the same method but took me more than 3 minutes.
Now permutation method.
0,1,2,3,4,5,6,7,8,9
We have 4 primes numbers (2,3,5,7)
For two digits number 4*4 = 16
For three digits number 9*4*4 =144
For Four digits the number cannot exceed 1560
Therefore, 1*6*3*4 = 72
1 because first digit cannot have more than 1 options (1)
6 because second digit cannot have more than 6 options (0,1,2,3,4,5)
3 because third digit cannot have more than 3 prime number (2,3,5)
4 because we can have all the prime numbers.
16+144+72=232
Let me know if I am doing something wrong.
Thanks,
That 3 in ur expression coreesponds to digits 2,3 and 5....means 10's digits can only be 2,3 or 5. However it is true only for numbers of form 15xx and not for others of the form 10xx, 11xx, 12xx, 13xx and 14xx. Hence u gettin the ans wrong.For Four digits the number cannot exceed 1560
Therefore, 1*6*3*4 = 72
u shud solve like
For Four digits the number cannot exceed 1560
Therefore, 1*6*4*4 - 1*1*1*4 = 92
-
- Legendary Member
- Posts: 661
- Joined: Tue Jul 08, 2008 12:58 pm
- Location: France
- Thanked: 48 times
Yours is the faster I think. Here what I did.acecoolan wrote:Isn't 252 the right answer
between 1- 100 = 16 numbers
between 100 - 1000 = 16 * 9 = 144 numbers
between 1000 - 1500 = 80 numbers
between 1500 - 1560 = 12 numbers
16 + 144 + 80 + 12 = 252
Am I doing something wrong?
How would you do this using permutations?
-A
1-100: 16 numbers
So 15*16=240
1500-1560: 12
So 252