What was Ramanujan's solution to the House Number Problem?

9.4k Views Asked by At

The wikipedia entry on Ramanujan contains the following passage:

One of his remarkable capabilities was the rapid solution for problems. He was sharing a room with P. C. Mahalanobis who had a problem,

Imagine that you are on a street with houses marked $1$ through $n$. There is a house in between $(x)$ such that the sum of the house numbers to left of it equals the sum of the house numbers to its right. If $n$ is between $50$ and $500$, what are $n$ and $x$?

This is a bivariate problem with multiple solutions. Ramanujan thought about it and gave the answer with a twist: He gave a continued fraction. The unusual part was that it was the solution to the whole class of problems. Mahalanobis was astounded and asked how he did it. "It is simple. The minute I heard the problem, I knew that the answer was a continued fraction. Which continued fraction, I asked myself. Then the answer came to my mind," Ramanujan replied.

What was the continued fraction, and how did it give all solutions to the problem? Most importantly, how could someone derive such a solution? Do similar problems also have continued fractions that describe all solutions?

This seems like an interesting and powerful method, and I would like to learn more about it.

2

There are 2 best solutions below

1
On BEST ANSWER

An expansion of Andre's comment into a detailed exposition can be found at http://www.johnderbyshire.com/Opinions/Diaries/Puzzles/2009-06.html. It's also at http://www.angelfire.com/ak/ashoksandhya/winners2.html#PUZZANS4.

1
On

If you don't know how to solve the problem by continued fraction, you can easily find by try and error (2x² = n² - n) the following solutions: x = 0, n = 0, x = 1, n = 1, x = 6, n = 8, x = 35, n = 49. Having found these solutions, we can see the solutions for n form a row. Each new solution for x is six times the last solution minus the solution before the last solution. 6 is 6 x 1 minus 0 and 35 = 6 x 6 minus 1. The same goes for n, but we have to add 2. 8 = 6 x 1 minus 0 plus 2. 49 = 6 x 8 minus 1 plus 2. So we have the conjecture that the next value for x will be 6 times 35 minus 6 is 204. And that the next n will be 6 x 49 minus 8 plus 2 = 288. Filling these numbers in in the equation 2x² = n² - n proofs the conjecture is right. This way we can find the next solution x = 1.189 an n = 1.681. And so on and on.