So I've been given the following problem:
How many positive integers are there that can not be written as a sum of 5's and 7's? For example, 4 is one of those integers, but 19 is not because 19 = 5 + 7 + 7. How to solve this?
So I've been given the following problem:
How many positive integers are there that can not be written as a sum of 5's and 7's? For example, 4 is one of those integers, but 19 is not because 19 = 5 + 7 + 7. How to solve this?
On
It is easy enough to conclude that a such positive integer $n$ must be of the form $$n=5a+7b+c$$ where $a,b$ are non-negative integers and $c$ are positive integers with $c\lt 35$, coprime with $35$ and such that $c$ is not solution of $5a+7b=c$.
There are $\phi(35)=(5-1)(7-1)=24$ positive integers coprimes with $35$ and less than it:$$1,2,3,4,6,8,9,11,12,13,16,17,18,19,22,23,24,26,27,29,31,32,33,34$$ of which the following twelve $$12,17,19,22,24,26,27,29,31,32,33,34$$ are solution of $5a+7b=c$ (this has been easily found taking sums among $5,10,15,20,25,30$ and $7,14,21,28$).
Consequently the asked numbers are given by all the positive integers of the form $$\color{red}{5a+7b=c\text{ where } c=1,2,3,4,6,8,9,11,13,16,18,23}$$
Hints:
(1) Start at the beginning: Can you get $1$, $2$,...
(2) If you can write a number $n$ as a sum of $5$s and $7$s, you can write $n+5$ as a sum of $5$s and $7$s.
(3) If you ever achieve five consecutive numbers that you can write as a sum of $5$s and $7$s, what will hint (2) allow you to conclude?