Counting Stones If you have a bucket of stones and remove two at a time, one will be left. If you remove three at a time, two will be left. If they're removed four, five, or six at at time, then three, four, and five stones will remain. If they're removed seven at a time, no stones will be left over.
What is the smallest possible number of stones that could be in the bucket? How do you know?
 A: If there had been just one more stone in the bucket, the number of stones would have been a multiple of 2, 3, 4, 5, and 6, and therefore a multiple of the least common multiple of 2, 3, 4, 5, and 6, which is 60. Thus the number of stones is one less than a multiple of 60, or in the sequence 59, 119, 179, etc. The smallest number of 7 in that sequence is 119.
A: Based on the comment below, I am adding a bit more honesty to this response:
The conditions of the problem are to find $n$ such that $n \equiv 1 \text{ (mod 2)}$, $n \equiv 2 \text{ (mod 3)}$, $n \equiv 3 \text{ (mod 4)}$, $n \equiv 4 \text{ (mod 5)}$, $n \equiv 5 \text{ (mod 6)}$, $n \equiv 0 \text{ (mod 7)}$.
$n \equiv 1 \text{ (mod 2)} \wedge n \equiv 2 \text{ (mod 3)} \Rightarrow n \equiv 5 \text{ (mod 6)}$, so the first two conditions don't really help us get anywhere. Next, $n \equiv 5 \text{ (mod 6)} \wedge n \equiv 3 \text{ (mod 4)} \Rightarrow n \equiv 11 \text{ (mod 12)}$. Lastly, $n \equiv 11 \text{ (mod 12)} \wedge n \equiv 4 \text{ (mod 5)} \Rightarrow n \equiv 59 \text{ (mod 60)}$, since the number has to end in a 4 or a 9 and also 11, 23, 35, 47, 59 are candidates. So we need to find that the smallest $n$ which is divisible by 7 such that $n \equiv 59 \text{ (mod 60)}$. The second possible choice is 119.
First, I had solved it computationally:
two_store = vector()
three_store = vector()
four_store = vector()
five_store = vector()
six_store = vector()
for (i in 1:100){
  cur = 7*i;
  if (cur%%2 == 1){
    two_store = c(two_store, cur);
  }
  if (cur%%3 == 2){
    three_store = c(three_store, cur);
  }
  if (cur%%4 == 3){
    four_store = c(four_store, cur);
  }
  if (cur%%5 == 4){
    five_store = c(five_store, cur);
  }
  if (cur%%6 == 5){
    six_store = c(six_store, cur);
  } 
}
two_three = intersect(two_store,three_store)
four_five = intersect(four_store,five_store)
two_five = intersect(two_three, four_five)
total = intersect(two_five,six_store)
