Jax bought exactly enough trees to plant eight equal rows. Then one tree died and couldn’t be planted, but he still had enough trees left to plant exactly nine equal rows. After that, a tree was stolen, but he still had enough trees left to plant exactly ten equal rows. If he bought the least number of trees satisfying these three conditions, how many trees did he buy?
n mod 8 =0
n mod 9 =1
n mod 10 =2
The LCM of 8/2, 9, 10/2 =180
Using "Chinese Remainder Theorem + Modular Multiplicative Inverse"
180 + 172 = 352 minimum number of trees
8 * A = 9 * B + 1 = 10 * C + 2
So.....
8A - 1 = 10C + 1
8A - 10C = 2
4A - 5C = 1
A C B
4 3 Not an integer
9 7 Not an integer
14 11 Not an integer
19 15 Not an integer
24 19 Not an integer
29 23 Not an integer
34 27 Not an integer
39 31 Not an integer
44 35 39
So he orginally has 8 rows * 44 per row = 352 trees
When he loses one he has 9 rows * 39 per row = 351 trees
Ad when he loses two he has 10 rows * 35 per row = 350 trees