For all number greater than or equal to 13, can we write this as 2x + 7y assuming x and y are non negative integers?

99 Views Asked by At

I'm attempting to solve this via induction

So for our base case let $k = 13$ then $x = 3, y = 1$ so the base case holds

Assume that for all $k$ where $ k \geq 13$ up to some integer $n$ that the claim holds s.t. they can all be written as some $2x + 7y$.

Where do I go from here?

2

There are 2 best solutions below

0
On

If $k \ge 0$ is even, $k = 2 \cdot (k/2) + 7 \cdot 0$.

If $k \ge 7$ is odd, $k -7$ is even, so $k - 7 = 2 \cdot ((k-7)/2)$ and $k = 2 \cdot ((k-7)/2) + 7 \cdot 1$.

0
On

For an even number $z>13$ then let $y=0$ and then $x=z/2$. For an odd number $z>=13$ then let $y=1$ and then $x=(z-7)/2$