Solution:
We shall show that f(n)=(n−1)!.
Label the horizontal line segments in the triangle l1,l2,… as in the diagram below. Since the path goes from the top triangle to a triangle in the bottom row and never travels up, the path must cross each of l1,l2,…,ln−1 exactly once. The diagonal lines in the triangle divide lk into k unit line segments and the path must cross exactly one of these k segments for each k. (In the diagram below, these line segments have been highlighted.) The path is completely determined by the set of n−1 line segments which are crossed. So as the path moves from the kth row to the (k+1)st row, there are k possible line segments where the path could cross lk. Since there are 1⋅2⋅3⋯(n−1)=(n−1)! ways that the path could cross the n−1 horizontal lines, and each one corresponds to a unique path, we get f(n)=(n−1)!.
Therefore f(2005)=(2004)!.
