Jandira must fill a $4 \times 4$ table that already comes with two cells pre-filled with the numbers 1 and 2 - see the side. Two cells are considered neighbors if they share a vertex or a side.

![](https://cdn.mathpix.com/cropped/2024_05_01_dbce7bc2a200e234c3e2g-06.jpg?height=192&width=260&top_left_y=782&top_left_x=1472)

The rules she must follow are:

- a cell can only be filled if one of its neighboring cells already contains a number;
- when filling a cell, the number to be placed is the sum of all the numbers that are already in its neighboring cells.

What is the largest number that can be written in the table?
There are several ways to fill in the table, depending on how we select the cell to be filled. Each time we have several cells that can be filled.

See an example of how to fill in the table: initially, we have 4 cells that can be filled - marked with $X$. We choose one of them and fill it according to the second rule, and repeat this process until the table is completely filled.
![](https://cdn.mathpix.com/cropped/2024_05_01_dbce7bc2a200e234c3e2g-26.jpg?height=398&width=1402&top_left_y=1296&top_left_x=328)

But to place the largest possible number in each cell, the idea is to examine all the cells that can be filled each time, and only fill the cell where we can place the largest number. If in two of these cells the number to be placed is the same, we will fill the one with the fewest filled neighbors. Let's go!

|  |  |  |  |
| :--- | :--- | :--- | :--- |
|  |  |  |  |
| 3 |  |  |  |
| 1 | 2 |  |  |

![](https://cdn.mathpix.com/cropped/2024_05_01_dbce7bc2a200e234c3e2g-26.jpg?height=184&width=954&top_left_y=1899&top_left_x=736)

|  |  |  |  |
| :--- | :--- | :--- | :--- |
| 9 | 18 |  |  |
| 3 | 6 |  |  |
| $\mathbf{1}$ | $\mathbf{2}$ |  |  |

![](https://cdn.mathpix.com/cropped/2024_05_01_dbce7bc2a200e234c3e2g-26.jpg?height=190&width=954&top_left_y=2094&top_left_x=736)

| 27 | 54 | 72 |  |
| :---: | :---: | :---: | :--- |
| 9 | 18 | 144 |  |
| 3 | 6 |  |  |
| $\mathbf{1}$ | $\mathbf{2}$ |  |  |$\Rightarrow$| 27 | 54 | 72 | 216 |
| :---: | :---: | :---: | :---: |
| 9 | 18 | 144 |  |
| 3 | 6 |  |  |
| $\mathbf{1}$ | $\mathbf{2}$ |  |  |$\Rightarrow$| 27 | 54 | 72 | 216 |
| :---: | :---: | :---: | :---: |
| 9 | 18 | 144 | 432 |
| 3 | 6 |  |  |
| $\mathbf{1}$ | $\mathbf{2}$ |  |  |


| 27 | 54 | 72 | 216 | $\Rightarrow$ | 27 | 54 | 72 | 216 |  | 2 | 5 | 72 | 216 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 9 | 18 | 144 | 432 |  | 9 | 18 | 144 | 432 |  | $\bar{g}$ | $\overline{1 \varepsilon}$ | $\overline{14}$ | 432 |
| 3 | 6 |  | 576 |  | 3 | 6 | 1178 | 576 |  | 3 | 6 | $\overline{117}$ | 576 |
| 1 | 2 |  |  |  | 1 | 2 |  |  |  | 1 | $\overline{2}$ |  | 1754 |


| 27 | 54 | 72 | 216 |
| :---: | :---: | :---: | :---: |
| 9 | 18 | 144 | 432 |
| 3 | 6 | 1178 | 576 |
| $\mathbf{1}$ | $\mathbf{2}$ | 3516 | 1754 |

Therefore, the largest number is 3516.