Magic trick

Leo, the magician asks a member of the audience to write down at most seven distinct prime numbers ( > 2 >2 ) without showing them to Leo. Then the chosen member multiply each number with itself, and tells the amount of the perfect squares to Leo. From that in a few secundum (without using calculator) Leo finds out how many numbers did the member write down.

For example if Sarah was the chosen member, and she writes down the numbers 3 , 13 , 23 , 29 , 3, 13, 23, 29, then she tells the number 3 2 + 1 3 2 + 2 3 2 + 2 9 2 = 1548 3^2+13^2+23^2+29^2=1548 .

Imagine that now you are the magician and you do the same trick (as Leo did) to your friend, Bob. Bob tells you the number 550632557 550632557

How many numbers did Bob write down?

6 2 7 1 4 3 5 Can't be determined

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.

1 solution

Joe Mansley
May 26, 2018

The square of an odd prime must be 1 mod 6, so we just need to take Bob's number mod 6, and we have the number of primes.

Not quite true - one of the primes could be 3 3 , which causes some ambiguity. If you use mod 4 4 in a similar way, though, you can do it in this case; either the number written down is congruent to 1 1 mod 4 4 , so there must be either 1 1 or 5 5 primes in the list; but square numbers can't end in 7 7 , so the answer must be 5 5 .

However, I think it works to use both mod 6 6 and mod 4 4 together to resolve ambiguous cases.

Chris Lewis - 1 year, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...