how many distinct ways number n can be made by 4, 6 and 10?

91 Views Asked by At

For example,

n = 4 4x1 1 way

n = 6 6x1 1 way

n = 8 4x2 1 way

n = 10 4x1 + 6x1, 10 x 1 2 ways

and how can I express this into an equation?

1

There are 1 best solutions below

0
On

It will be 0 for odd n, so you can divide all by 2 and examine the same problem for 2,3 and 5.

If n=2x+3y+5z, you can count for each $z\in\{0,1,...,n/5\}$ how many of pairs (x,y) you have. Approximately it will be $\frac{n-5z}{6}$ of pairs (x,y), mostly depends on divisibility of n.

If n=30k+r and S the number of distinct ways, then $$r=0 \implies S=5k+1+(5k-1)+(5k-1)+(5k-2)+(5k-3)+(5K-4)+5(k-1)+1+[5(k-1)-1]+..$$ You can get the sum by this formula $$S=\frac{30k(k+1)}{2}+f(r)k+g(r)$$ where f(r) and g(r) you can find for each $r\in\{0,1,...,29\}$ by putting instead k 0 and 1. r_____f____g
0___-10___1
1___-9____0
2___-7___1
3___-7___1
4___-7___1
5___-5___2
6___-4___2
7___-2___2
8___-2___3
9___-2___3
10___0___4
11___1___4
12___3___5
13___3___5
14___3___6
15___5___7
16___6___7
17___8___8
18___8___9
19___8___9
20__10__11
21__11__11
22__13__12
23__13__13
24__13__14
25__15__15
26__16__16
27__18__18
28__18__18
29__18__19