5's and 7's...

What is the largest positive integer that can't be made by adding up 5's and 7's?


The answer is 23.

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.

2 solutions

Siva Budaraju
Mar 22, 2018

By the Chicken McNugget theorem , the largest positive integer that can't be made by adding up 5's and 7's is 5*7-5-7 = 23.

Nice solution, Siva!

Geoff Pilling - 3 years, 2 months ago

Log in to reply

Thanks! I appreciate it!

Siva Budaraju - 3 years, 2 months ago
Geoff Pilling
Mar 22, 2018

We have the following:

  • 24 = 7 + 7 + 5
  • 25 = 5 + 5 + 5 + 5 +5
  • 26 = 7 + 7 + 7 + 5
  • 27 = 7 + 5 + 5 + 5 + 5
  • 28 = 7 + 7 + 7 + 7

And, of course, any number greater than these 5 can be obtained by continuously adding 5's to the above numbers.

i.e. For N n > 28 N_n > 28 , the recursion relation N n = N n 5 + 5 N_n = N_{n-5} + 5 can be applied repeatedly until you have one of the above numbers.

Therefore 23 \boxed{23} is the largest number that can't be made by adding 5's and 7's.

And 23 can't be made since it doesn't divide by 5, and neither does 23-7, 23-14, or 23-21.

P = 7 and Q = 5

Ans: PQ -P-Q = 35 -7-5 = 23

The Chicken McNugget Theorem (or Postage Stamp Problem or Frobenius Coin Problem) states that for any two relatively prime positive integers m,n, the greatest integer that cannot be written in the form am + bn for nonnegative integers a, b is mn-m-n.

Ossama Ismail - 3 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...