An interesting challenge



#12

How many 9-digit numbers containing all the digits 1,2,3,4,5,6,7,8,9 are prime numbers?

Edited: 19 Nov 2011, 2:39 a.m.


#13

Off the top of my head... Zero.

The sum of 1..9 = 45, which is a multiple of 9. Therefore any 9
digit number formed from a permuation of those 9 digits is also a multiple of 9 and thus not prime.


#14

Yes, what I had in mind actually was divisibility by 3. What a great way to teach the divisibility by 3 rule, which students can never seem to remember.

Edited: 19 Nov 2011, 7:07 a.m.


#15

Don, do you have an easy proof for this rule (there are two: one for 3 and one for 9 and a similar one for 11)?


#16

You will easily get the idea if you look at the example of a, say, four-digit number.

This number will consist of the four digits abcd. It can be divided by 9 if abcd mod 9 = 0.

A number abcd can be written as

    1000 a  +  100 b +  10 c  +  d
We now want to evaluate
   (1000 a   +  100 b   +  10 c   +  d) mod 9
= (999a + a + 99b + b + 9c + c + d) mod 9
Since 999, 99, 9 etc. are all integer multiples of 9, this simplifies to
   (a  +  b  +  c  +  d) mod 9
In other words: in order to test whether a number can be divided by 9, simply check the sum of its digits. So if the remainder of the digit sum divided by 9 is zero, the number itself can be divided by 9 as well. This also means: if the remainder is 3 or 6, i.e. it can be divided by 3, the number itself is divisible by 3.

In other words:

If the digit sum is divisible by 9 resp. 3, so is the number itself.

Example:

  n = 12345
sum of digits = 15
15 is not divisible by 9, but the remainder (6) is. Or: 15 can be divided by 3. So 12345 is divisible by 3 as well.

BTW, you can also continue with the digit sum of 15 which is 6 and judge the divisibility from this result. ;-)

Dieter


Edited: 19 Nov 2011, 8:43 a.m.

#17

Search for 'divisibility' in Wikipedia

Patrice

#18

Well, I don't have a proof, just the fact that every middle school math textbook I've seen that discusses factoring and divisibility lists the test for divisibility for selected numbers. I generally teach the easy ones: 2 (even number), 3 (sum of digits divisible by 3), 5 (ends in 0 or 5), and 10 (ends in 0). There are tests for divisibility for other numbers, as Wikipedia shows, but in middle school we usually limit it to those 4.


#19

4 is easy: the last two digits (read as a two digit number) need to be divisible by 4.

There is another rule for 11: It deals with the pairwise digit sum. Example 121: The pairwise sum is 01 + 21 = 22. This is divisible by 11 and hence 121 is. The proof must be similar to what Dieter has shown.


#20

Quote:
The proof must be similar to what Dieter has shown.

You bet. :-)

The method is based on the fact that 99, 9999, 999999 etc. are all divisible by 11 (which can be easily proven as well). The approach is basically the same as before. Here, the number consists of groups with two digits aa, bb, cc etc., so an eight-digit value can be written as aabbccdd.

   aabbccdd mod 11
= (1000000 aa + 10000 bb + 100 cc + dd) mod 11
= ( 999999 aa + aa + 9999 bb + bb + 99 cc + cc + dd) mod 11
Since 99, 9999, 999999 etc. are divisible by 11, this simplifies to
   (aa + bb + cc + dd) mod 11
q.e.d.

Dieter

#21

I'd be stunned if this problem would make the rule easier to remember. It seems like the rule is pretty easy to remember as is.

Actually, it seems like an easier rule to help remember this (as well as the times tables for 9) is that 9 times any single digit number results in a number whose digits not only add to a multiple of 9, but 9 itself.

#22

I guess app calculators are out of competition.

RPL+:

\<< 123456789 permutate isPrime total \>>

EDIT: he who doesn't know math, needs a calculator...


Edited: 19 Nov 2011, 7:52 a.m.


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP-80 History, Design and Interesting Facts BShoring 1 1,378 11-30-2013, 08:50 AM
Last Post: Xavier A. (Brazil)
  Interesting TI Nspire CAS CX programming features Namir 5 1,972 04-15-2012, 04:11 PM
Last Post: Namir
  An interesting riddle Don Shepherd 15 4,053 03-13-2012, 11:54 PM
Last Post: Don Shepherd
  Interesting patterns for HP-42S Tom Grydeland 6 2,309 03-07-2012, 07:40 AM
Last Post: Tom Grydeland
  Interesting Book with lots of HP info Dave F 2 1,494 02-17-2012, 03:09 AM
Last Post: Nick_S
  OT but interesting; a new calendar proposal Don Shepherd 12 3,591 01-02-2012, 04:32 PM
Last Post: Don Shepherd
  Interesting AT&T hp-15C Gerardo Rincon 13 3,404 11-28-2011, 11:11 AM
Last Post: Lincoln R.
  Interesting find: HP 9875A dual cassette drive David Ramsey 16 4,003 11-03-2011, 06:59 PM
Last Post: Eric Smith
  OT: Interesting Documentation - Sanyo Calculator Katie Wasserman 6 2,088 08-31-2011, 04:28 AM
Last Post: Didier Lachieze
  OT, but interesting Don Shepherd 5 1,868 08-15-2011, 12:51 PM
Last Post: Don Shepherd

Forum Jump: