TITLE: A question with infinity
QUESTION [10 upvotes]: I am a sophomore in high school and my math teacher did a very short lesson on infinity, here's how it went:  (Try to solve each part yourself the first two are easy)
Part 1
You have an inf. number of boxes each labeled like so
[1][2][3][4].....

and that there is a person in each one of these boxes.  But you have another set of five boxes like so
[1][2][3][4][5]

You want to only have one set of boxes what do you do?  You must be able to tell each person what box they should goto next.
Spoiler

Each person is told to move down five boxes.  Or n+5 is you new box, and the five people from the other boxes are able to move into the first five boxes or just n+0.

Part 2
Well you actually have two of these inf. box sets, but you really only want one.  What now? (same rules apply)

Each person from set one is told to go to box 2n and each person from set two is told to box 2n-1

Part 3
Now you have an inf. number of these inf. box sets arranged like so
1: [1][2][3][4][5]...
2: [1][2][3][4][5]...
3: [1][2][3][4][5]...
4: [1][2][3][4][5]...
5: [1][2][3][4][5]...

and you want to fit them all into one inf. box set, how do you do it.  She refused to tell us the answer and no one in my class figured it out, but I think I just did (correct me if I'm wrong, I'm also looking for alternate solutions).
How I went about solving this problem
Step 1

I assumed that there had to be some sort of pattern so I tried a few

Step 2

I picked the following patter.

1: [1][3][6][10][15]...

2: [2][5][9][14][]...

3: [4][8][13][][]...

4: [7][12][][][]...

5: [11][][][][]...

The numbers in the box represent the new box of each person

Step 3

I started to create a formula for the people to find there new room based of there current room number and box set number.  I found the following sequence in for people in the first row, 1 3 6 10 15.  Or +2 +3 +4 +5.  Which told me that it was quadratic so the equation had to be ax^2 + bx + c = new room number

Step 4

I found three equation by plugging in room numbers and their correct new room numbers to find these three equations:

(1^2)a + 1b + c = 1 or a + b + c = 1

(2^2)a + 2b + c = 3 or 4a + 2b + c = 3

(3^2)a + 3b + c = 6 or 9a + 3b + c = 6

Step 5

After solving this system I got the following equation 1/2x^2 + 1/2x + 0 = new room number where x = current room number.  This of course only tell the people in the boxes on the bottom where to go. Now I needed to find how to place the rest of the people.  The first thing I noticed was that people on the same diagonal as seen bellow were very much related to each other when you look at the rooms they will end up in.

[x-4][][][][]

[][x-3][][][]

[][][x-2][][]

[][][][x-1][]

[][][][][x]

The solution

Working this knowledge into my equation was fairly easy (I was able to do it while going for a run so I won't explain how I got my equation).  The equation is:

 (1/2(r+c-1)^2 + 1/2(r+c-1) + 0)-r+1 = new room number | r = row | c = column 

Now my question to all of you is

Is my equation correct?
Are there any alternate solutions to this problem?
How could you fit a 3D array of boxes (inf boxes of people in all direction) into a 1D line of boxes?
Can you find a way to fit a n dimensional array of boxes into a 1D line of boxes? 

For any of you into JAVA here's a a short snippet of code I made to prove my answer
    package main;

public class Main {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int f = 2;
        int r = 1;
        int c = 1;
        while(true){
            double x = (.5*(r+c-1)*(r+c-1) + .5*(r+c-1) + 0)-r+1;
            System.out.print(x +", ");
            c++;
            r--;
            if(r < 1){
                r = f;
                f++;
                c = 1;
            }
        }
    }
}

REPLY [2 votes]: The following answer is not yet complete solution, but I think it might be an idea how to approach the problem yourself.
I recall the Collatz-problem in the "syracuse"-statement and look at the inverse transformation which allows to construct an infinite tree with infinitely many infinitely long "boxes" where each odd natural number occurs exactly one time (well, whether all odd natural numbers occur at least once is really open, but it would not spoil the resulting infinite indexing-system).
The "syracuse"-statement of the Collatz-transformation is with an odd a and b and a natural $A \ge 1$ is $$ b = {3a+1 \over 2^A} $$ where the value of A and that of b are of course uniquely determined by the value of a. But there are a lot (actually infinitely many) of different a which lead to the same b, so if we invert the transformation,
$$ b = {a 2^A - 1 \over 3} $$ we have for each a by infinitely many A's infinitely many different b, so we could write infinitely many indexed b as $$ b_{A} = {a 2^A - 1 \over 3} $$ and now each of the infinitely many $b_A$ can be treated similarly to get $$c_{A,B} = {b_A 2^B - 1 \over 3} $$
This scheme implements an infinite long index (the infinite number of boxes) and each box is of infinite length. One need now to show, that the occuring values are unique, which I think is not too difficult (it is not solving Collatz, because that (unsolved) conjecture is that the values are not only unique but also including all odd positive natural numbers which makes it so difficult).      
(I have also another statement from the same problem for the infinitude of infinite bins, maybe I can reproduce it here later as an even easier-to-see representation, I'm short of time at the moment, sorry)