I can find the answer by listing all the possible ways but I want to know a more logical way to solve this problem. Can someone help me?
Asked
Active
Viewed 412 times
1
-
3Start by choosing how many $$5$ bills there are. There has to be an odd number of $$5$ bills(by parity). Then the number of $$2$ bills will follow once you choose the number of $$5$ bills. – Aiden Chow Sep 15 '20 at 22:58
-
Would you be interested in seeing a general method to figure out recursions for this kind of thing? – paul garrett Sep 16 '20 at 01:10
-
It can help, https://math.stackexchange.com/questions/80822/solutions-to-linear-diophantine-equation-15x21y-261 – Lion Heart Sep 16 '20 at 07:02
2 Answers
2
Solving this equation $5x+2y=69$ in positive integers
$2y=69-5x$
x is an odd number and $0<x<14$, since $69-5x>0$ is a multiple of 2 and positive that is an even number
There are 7 solutions.

Lion Heart
- 7,073
-
Sorry, this doesn't help the questioner much. E.g., why "7", in terms of the other parameters? What process did you carry out...? – paul garrett Sep 16 '20 at 01:05
0
It is easy to find the first two dozen terms and a lookup in OEIS finds that it is sequence A008616 which has a generating function of $1/((1-x^2)(1-x^5))$. The entry also has a formula $a(n) = \lfloor n/10+ (3+(-1)^n)/4\rfloor.$ Thus $a(69)=7.$ If you want a list of these solutions you can use an extended g.f. of $1/((1-x^2)(1-x^5y))$ and get the coefficient of $x^n$ as a polynomial in $y$.

Somos
- 35,251
- 3
- 30
- 76