Finding points in a grid with exactly k paths to them? Suppose that we begin at (0, 0) and are allowed to take two types of steps - steps one unit up and steps one unit to the right.  For example, a legal path might be (0, 0) → (1, 0) → (2, 0) → (2, 1) → (3, 1).
Now, suppose that you are given a number k.  Is there an efficient algorithm to list of all points (x, y) with exactly k paths to them?  For example, given the number 6, we would list (1, 5), (5, 1) and (2, 2), since these points have exactly six paths to them.
Thanks!

This sounds to me like a combinatorial problem.
Say you start in (x, y) and want to go to (x+3, y+3). If we represent all "up" movements by 'U' and all "right" movements by 'R', such a path could be UUURRR. The total number of possible paths would be all possible permutations of UUURRR, namely 6!/(3!3!) = 20.
An algorithm finding all these paths could be to put all 'U's and 'R's in a pool and select one from the pool. This will be your first move. Then find all permutations involving the rest of the pool. Finally swap your first choice (i.e. an 'U') for the opposite choice (this time an 'R') and do it again. Recursively you'll now have found all possible paths between the two points.
Updating the answer reflecting templatetypedef's comments below:
If you want the number of paths reachable within k number of steps, the solution is still feasible and similar. Perhaps even simpler. Choose a 'U' then calculate the number of paths using (k-1) steps from there to the destination. After this is complete, choose an 'R' and calculate the number of paths using (k-1) steps from there to the destination. These two numbers added together will be your answer. Use recursion on the (k-1) subpath-steps.
If you want the points with exactly n subpaths leading to them, it gets trickier. One way could be to go by binomial numbers. Find all i and j such as i!/((i-j)!j!)=n. This will take O(n) time since i+j<=n. Then you can use my proposition above for finding the number of paths reachable within k number of steps. OleGG's solution below might be cleaner though. I leave it to you to benchmark :)
