How many prime

quattro

Administrator
Staff member
There are 362,880 numbers that can be made using all of the digits from 1 to 9 inclusively.

There are 40,320 numbers that can be made using all of the digits from 1 to 8.

Out of these 403,200 numbers, how many are prime numbers?

Richard
 
dont think so - was just thinking about this.

The number 2 is prime, and also you're missing '0' as a digit so i think that means halving it and doing -1 wouldnt count ...
 
rockdemon said:
oooh.... interesting one :)

Should that read 1 to 9?

Rich.

Should it though?

Isn't quattro telling us there are 362,880 numbers that can be made using all of the digits from 1 to 9 once only ([123,456,789], [123,456,798], [123,456,978], [123,465,978], [345,127,869], etc?), and also there are 40,320 numbers that can be made using all of the digits from 1 to 8 once only ([12,345,678], [12,345,687], [12,345,768], [12,346,578], [34,512,786], etc?)

And out of those (362,880 + 40,320 =) 403,200 numbers, how many are prime numbers?

That's some puzzle!
 
richarduk said:
Would i be right saying half of the numbers are even and so can be excluded?

Four out of nine would be divisable by two 8)

How do you work out if other numbers are divisable by other single digit numbers?

This is not as complicated as it seems

Richard
 
No takers?

I'll post the answer later.

Clue - how do you know if a number is divisable by 9

Richard
 
SydneyRoverP6B said:
quattro wrote,...
Clue - how do you know if a number is divisable by 9

Hello Richard,

Any integer which is divisible by 9 is not prime, except for 9 itself.

Ron.

If you know how to find out whether a number (the 8 and 9 digit numbers in question) can be divided by 9, then you are half way there 8)

Richard

oh and 9 isn't prime Ron :oops:
 
1 is irrelevant

2 if a number ends in 0,2,4,6 or 8 it isnt prime. (apart from 2)

3 if a number is n1n2n3n4n5n6n7n8n9 if n1+n2+n3+n4+n5+n6+n7+n8+n9 == multiple of 3 it isnt prime. for 8 it's 36 - for 9 it's 45. So there are no primes in this range???

no need to go on....

Given 3... the answer is zero...????


Rich.
 
rockdemon said:
1 is irrelevant

2 if a number ends in 0,2,4,6 or 8 it isnt prime. (apart from 2)

3 if a number is n1n2n3n4n5n6n7n8n9 if n1+n2+n3+n4+n5+n6+n7+n8+n9 == multiple of 3 it isnt prime. for 8 it's 36 - for 9 it's 45. So there are no primes in this range???

no need to go on....

Given 3... the answer is zero...????


Rich.

Well done Rich

If all of the digits from 1 - 9 are used then every one of the 9 figure numbers have the same digits in different order. So you can add them all up, then add the digits of the answer, and so on until you get a single digit.

So 4572 become 4+5+7+2 = 18, and 18 becomes 1+8 = 9 - 4572 is therefore divisable by 9 (and 3 and 6)

123,456,789 adds up to 45, and 4+5=9

12,345,678 adds up to 36, and 3+6=9

So all of the numbers are divisable by 9, and of course 3 as Rich says, so there are no prime numbers in the 403,200

Richard
 
Hi Richard,

Your hint about looking at single digits did point me the right way...

Was a fun little exercise that one :)

Rich
 
rockdemon said:
Hi Richard,

Your hint about looking at single digits did point me the right way...

Was a fun little exercise that one :)

Rich

I found it in a mag I get every month or so, took me ages to work that out.

Then along came that eureka moment 8)

Richard
 
Hold on lads... Are we sure that the reasoning is correct here? I'm not saying you lot are wrong, but something doesn't seem to 'feel' right to me with the reasoning.

Hmm...

Addendum: I stand corrected. I now see what the reasoning is. The sum of digits in 1-8 numbers is 36, which means the number is divisible by 9 (and 3, [and also 6 as the sum is both divisible by 3 and even])

1-9 add up to 45, which also is divisible by 9 (and also 3)

Any number divisible by 9 is NOT a prime number at all!

Good puzzle! :D
 
darth sidious said:
Hold on lads... Are we sure that the reasoning is correct here? I'm not saying you lot are wrong, but something doesn't seem to 'feel' right to me with the reasoning.

Hmm...

If a 9 digit number has all of the digits from 1 to 9 in it, then all of the 9 digit numbers have the same digits, just in a different order, and they all add up to 45.

Same with the 8 figure numbers, adding up to 36.

I can't see a problem with it

Richard

You edited your post when I was writing mine Darth :)
 
quattro said:
darth sidious said:
Hold on lads... Are we sure that the reasoning is correct here? I'm not saying you lot are wrong, but something doesn't seem to 'feel' right to me with the reasoning.

Hmm...

If a 9 digit number has all of the digits from 1 to 9 in it, then all of the 9 digit numbers have the same digits, just in a different order, and they all add up to 45.

Same with the 8 figure numbers, adding up to 36.

I can't see a problem with it

Richard

You edited your post when I was writing mine Darth :)

Yes, I knew that 1-9 add up to 45, and 1-8 add up to 36 {i.e. [n x (n + 1)]/2} but couldn't see at the time how that would verify/show there were no primes! The penny didn't drop until some time after!
 
Back
Top