Each line has 80 characters

There are 40 lines on each page and 410 pages on each book

We can calculate the number of characters on each book.

\[ \begin{aligned} pages\_per\_book &= 410\\ char\_per\_book &= 80 \cdot 40 \cdot pages\_per\_book \end{aligned} \]

Each character can be any of 25 symbols

The total number of books is \(25^{1312000}\) which is not easy to calculate without the proper tools

A quick “back-of-the-envelop” calculation can confirm this result. We have \[25^n = 5^{2n} ≈ 4^{2n}=2^{4n}\] Thus we are speaking about a little more than 5.2 million bits

Using the rule of thumb \(2^{10}≈10^3\) we get \(10^{1.6\text{ million}}\) books.

The difference between \(5^{2n}\) and \(4^{2n}\) is important, so we will try better. We have \[25^n = 5^{2n} = 4^{2n\log_4(5)}\]

We have that \(\log_4(5)≈1.16\) so to change from base 5 to base 4 we need to increase the exponent by 16%. So 1.3 millions become 1.5 millions, and so we have near \(4^{3\text{ million}}=2^{6\text{ million}}\) books.

In fact it may be easier to see that \(\log_2(5)\) is a little more than 2, in
fact near 2.32, thus \[25^n =
2^{2n\log_2(5)}≈ 2^{4.64 n}\] When \(n\) is 1.3 million, then \(4.64 n\) is about 6 million. We need 6
megabits just to count the number of books in The Library. Now, \(2^n ≈10^{3n/10},\) therefore there are near
10^{1800000} books.

We need to work with orders-of-magnitude of orders-of-magnitude.

Using more data from the story, we can calculate how many books fit on each room, and therefore how many rooms are in the Library.

\[ \begin{aligned} books\_per\_shelves =& 32\\ shelves\_per\_wall=& 5\\ walls\_per\_room =& 4\\ books\_per\_room =& books\_per\_shelves \cdot shelves\_per\_wall\\ & \cdot walls\_per\_room\\ rooms =& books / books\_per\_room\\ \end{aligned} \]

The area of a hexagon of side \(s\) is \[\frac{3\sqrt{3}·s²}{2}\] Thus, we need to know the width of each wall

We know that there are 32 books on each shelf, so we need to estimate the width of each book.

- Paper thickness is around 0.0001m, that is, 10 pages per millimeter. This is based on the fact that a pack of 500 page takes more or less 5cm.
- Each sheet has 2 pages
- The covers are 1 mm each

\[ \begin{aligned} paper\_width &= 1⋅ 10^{-4} m\\ book\_width &= paper\_width \cdot \frac{pages\_per\_book}{2} + 2e-3 m \end{aligned} \]

\[ wall\_width = book\_width \cdot books\_per\_shelves \]

\[ room\_area = \frac{3 \sqrt 3}{2} \cdot wall\_width^2 \]

and then the area of the whole library

\[ library\_area = room\_area \cdot rooms \]

Compare this area to the surface of Earth

\[ earth\_radius = 6371 ⋅ 10^3 m\\ earth\_area = 4 \pi \cdot earth\_radius^2 \]

\[ \begin{aligned} room\_height &= 1.6 m\\ book\_height &= room\_height / shelves\_per\_wall\\ aspect\_ratio &= 3/4\\ page\_area &= aspect\_ratio \cdot book\_height^2 \end{aligned} \]

\[ \begin{aligned} paper\_weight &= 50⋅ 10^{-3} kg/m^2\\ page\_weight &= page\_area \cdot paper\_weight\\ book\_weight &= pages\_per\_book \cdot page\_weight \end{aligned} \]

\[ room\_weight = books\_per\_room \cdot book\_weight \]