My science class is pretty small. There are just 18 students in the class. My teacher, Mr. Burnett, has an unusual system for picking lab partners. He has given each student a number from 1 to 18, and on lab days, he pulls two numbers out of a bag to match people up. During our last lab I noticed that the sum of each pairing was a perfect square. How were the partners paired with each other?

18 - 7

17 - 8
16 - 9
15 - 1
14 - 2
13 - 3
12 - 4
11 - 5
10 - 6

Ggghh

18-7 isn't a prefect square

To solve this problem, we need to find all possible pairings of the 18 students such that the sum of each pair is a perfect square. Here's how we can approach it:

1. First, let's list down all the perfect squares from 1 to 18. The perfect squares until 18 are: 1, 4, 9, and 16.

2. Next, let's consider all the possible combinations of these perfect squares that add up to 18. We can start by pairing the highest perfect square, 16, with the smallest one, 1. This leaves us with 18 - (16 + 1) = 1 student remaining. Since there's only 1 student left, we can pair them up together.

3. Now, let's move on to pairing the perfect square 9. We can pair it with the remaining student from the previous step. This leaves us with 18 - (9 + 1) = 8 students remaining.

4. For the remaining students, we can pair them up by using the perfect square 4. We can pair them up in pairs of two until all the remaining students have been paired.

By following this process, we can find the pairings that satisfy the condition where the sum of each pairing is a perfect square. The possible pairings are:

(16, 1)
(9, 8)
(4, 2)
(4, 2)
(4, 2)
(4, 2)
(4, 2)
(4, 2)

Note: The pair (4, 2) appears multiple times because there are more students left than the remaining perfect squares, so they need to be paired together in multiple pairs.

So, in this case, the partners were paired according to the above combinations.