I was reading In Code by Saray Flannery,one of the problem in the book bothered me, it is not the problem itself, it is the solution.(adsbygoogle = window.adsbygoogle || []).push({});

A Party Trick

If someone tells me 2, 2 and 3 are the remainders when she divides her age by 3, 5 and 7 respectively then I can work out her age.

Solution:

Let x = 2, y = 2, z = 3 and a = the age of the girl. Then she used this formula:

a = (70x + 21y + 15z)mod n

= (120 + 42 + 45)mod (3 x 5 x 7)

= 227mod105

= 17 years old

I have no idea of how this works. Where does this formula come from? There must be a logical way to explain this right? And are there any other ways of solving this kind of problem?

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# A Party Trick

Loading...

Similar Threads - Party Trick | Date |
---|---|

Insights 10 Math Tips to Save Time and Avoid Mistakes - Comments | Oct 9, 2017 |

B Factoring trick by determining a zero value | Dec 16, 2016 |

Can anyone identify this series trick? | Dec 15, 2015 |

Dividing fraction trick, why does it work? | May 28, 2014 |

**Physics Forums - The Fusion of Science and Community**