| Small Jar | Large Jar |
| Selling Price | $4 | $7 |
| #Units | a | b |
Question: How many 2-digit integers (10 to 99) cannot be the revenue from sale of honey jars?
Revenue from sales of honey jars yesterday =
4a + 7b
There are only 4 types of integers between [10,99] -> 4k, 4k + 1, 4k + 2, and 4k + 3.
(1) 4k -> 12, 16, 20, ....Clearly, all these 2-digit integers are possible revenue values. (4a + 7b) with b= 0 will give us all the above values.
(2) 4k + 1 -> 13, 17, 21, 25, 29, ...- Can 13 be written as 4a + 7b? No.
- Can 17 be written as 4a + 7b? No. Remember -> given 4b is even, for 4a + 7b to be odd, 7b has to be odd too. b= 1,3, etc. Impossible to write 17 as 4a+7b
- Can 21 be written as 4a + 7b? Yes. 4(0) + 7(3)
Observe: From 21 onwards, we don't need to check further. Because 21 = 4(0) + 7(3). Every further number in this series can be obtained by just adding 4s.
-> 25 = 4(1) + 7(3)
-> 29 = 4(2) + 7(3)
-> Etc.
Key insight: Once we hit a 7-multiple (like 21), that and every subsequent number can easily be expressed as 4a+7b. We won't need to worry about those numbers!!
So far ->
we have identified 2 2-digit integers that cannot be the revenue.
(3) 4k + 2 -> 10, 14, 18, 22, ... - Can 10 be written as 4a + 7b? No.
- Can 14 be written as 4a + 7b? Yes.
So, every subsequent number in this series (18, 22, etc.) can easily be expressed as 4a+7b.
-> 18 = 4(1) + 7(2)
-> 22 = 4(2) + 7(2)
-> 26 = 4(3) + 7(2)
-> Etc.
So, we don't need to worry about any of these numbers.
So far ->
we have identified 3 2-digit integers that cannot be the revenue. (10, 13, and 17)
(4) 4k + 3 -> 11, 15, 19, 23, 27, 31, 35, 39, 43, ...
Given that 7 itself is 4k+3,
4K+3 -> 7, 11, 15, 19, ......
Of course, we are concerned about 2-digit numbers only. But we can clearly see that every single number in this series can be expressed as 4a+7b.
7 -> 4(0) + 7(1). And so on. If we forget about "7" being 4k+3, that is not a problem. We could still check carefully from the 1st 2-digit 4k+3, till we hit a 7-multiple, as we have done in the earlier cases.
-> 11 = 4(1) + 7(1)
-> 15 = 4(2) + 7(1)
-> 19 = 4(3) + 7(1)
-> 23 = 4(4) + 7(1)
-> 27 = 4(5) + 7(1)
-> 31 = 4(6) + 7(1)
-> 35 = 4(0) + 7(5)
-> 39 = 4(1) + 7(5)
-> 43 = 4(2) + 7(5)
-> Etc.
In any case, we can clearly see that among the numbers of the form 4k + 3, every single number can be expressed as 4a + 7b.
So,
Overall->
There are exactly three 2-digit integers that cannot be the revenue. (10, 13, and 17).
---
Harsha