## Google’s Treasure Hunt Hint Hint

May 18th, 2008Google is hosting another great treasurehunt at http://treasurehunt.appspot.com/. A good friend (and awesome upcoming coder) Lauren and I are working at the library together and we just had a go at it. It turns out there’s a beautiful connection between the answer for any given n*m grid and Pascal’s triangle. Keep your eyes open for those numbers!

Kudos to Lauren for spotting the connection: “Wait isn’t this those, whaddumacallit, triangle numbers?”

1 1 2 1 4 4 1 6 12 8 1 8 24 32 16 1 10 40 80 80 32 1 12 60 160 240 192 64 1 14 84 280 560 672 448 128

Update: After a few premature victory celebrations, we finally got the answer in the form of a short Ruby script. With the following methods…

```
```

```
class Fixnum
def factorial
if self <= 0
return 1
else
return self * (self-1).factorial
end
end
def choose n
((self.factorial)/(n.factorial*(self-n).factorial))
end
end
```

```
```

The solution is a simple one-liner.

December 10th, 2009 at 6:22 pm

Wave Invites…What a refreshing topic! I really enjoyed your point of view and can’t wait to read some of your upcomming posts. I’m going to link to your blog if you don’t mind as I think my readers might find some value in your topics….