`Error, (in F) object too large`

`> `

**And that's **
**only**
** **
**!! But we will later be examining **
**!!!!**

__Question__
**. How can one do this?**

__Answer__
**. **
__Simply by__
** working with an approximate decimal value for **
**, **
__and not__
** compute explicit computation of actual values of **
**:**

`> `
**say1 := proc(n) **

lprint(`The ACTUAL NUMBER ('m') of base

10 digits in the`,n,`-th. Fermat number is`,

floor((2^n)*log[10](2.0)) + 1)

end:

`> `

__Some comparative examples__
** (**
__Note__
**: I have placed the comment sign '#' immediately before the command to prevent output, and to save space in this worksheet. All you have to do if you are interested is:**

**first delete the '#' **

**then go to File and Save as a precaution **

**and then execute the command**

`> `
**# length(2^(2^19) + 1);**

`> `
**say1(19);**

`The ACTUAL NUMBER ('m') of base `

10 digits in the 19 -th. Fermat number is 157827

`> `

`> `
**length(2^(2^21) + 1);**

`Error, object too large`

`> `
**say1(21);**

`The ACTUAL NUMBER ('m') of base `

10 digits in the 21 -th. Fermat number is 631306

`> `

`> `
**say1(200);**

`The ACTUAL NUMBER ('m') of base `

10 digits in the 200 -th. Fermat number is 483736552500000000000000000000000000000000000000000000000001

`> `

**One should bear in mind that 'ACTUAL VALUE' should be understood to be 'APPROXIMATE VALUE' for **
__large__
** values of **
**n**
**, because of rounding **

**errors involving the 10-place approximate value Maple is using for **
**. **

__But the order of magnitude is certainly correct__
**.**

**Now let's look at **
** [**
__Note__
**: I have placed the comment sign '#' immediately before the command to prevent output, and to save space in this worksheet. All you have to do if you are interested is:**

**first delete the '#' **

**then go to File and Save as a precaution **

**and then execute the command ]**

`> `
**# say1(382477);**

`> `

**I think we would all agree that is a bit too much!!**

**That can easily be dealt with by making a **
**simple alteration**
** to the procedure say1:**

`> `
**say2 := proc(n) local P1, P2, M;**

P1 := n*log[10](2.0);

P2 := log[10](log[10](2.0));

M := P1 + P2;

lprint(`A good APPROXIMATE value of

the number of base 10 digits in the`, n,

`-th. Fermat number is 10 TO THE POWER of`, M)

end:

`> `

**The **
**rationale**
** behind the definitions of those **
**local variables**
** should be clear [but would require some explanation for some students].**

**[I could omit those local variables altogether, but I have used them as a guide to **
**how**
** the '**
**M**
**' is arrived at.]**

__Some examples__
**.**

`> `
**say2(12);**

`A good APPROXIMATE value of`

the number of base 10 digits in the 12 -th. Fermat number is 10 TO THE POWER of 3.090969720

`> `

**Remove the comment sign, and execute, to compute actual value:**

`> `
**# F(12); **

`> `
**length(F(12));**

`> `
**10^3.090969720;**

`> `

`> `
**say2(1000);**

`A good APPROXIMATE value of`

the number of base 10 digits in the 1000 -th. Fermat number is 10 TO THE POWER of 300.5086055

`> `

`> `
**say2(382447); # the new record composite Fermat number**

`A good APPROXIMATE value of`

the number of base 10 digits in the 382447 -th. Fermat number is 10 TO THE POWER of 115127.4974

`> `

**Thus the Fermat number **
** **
**has a **
__huge__
** number of digits, and so clearly it is going to require rather a large board on which to write it down. That, then, brings us to:**

__Question #2: __
__how big__
__ a board?__

**Let's think about writing **
** in a **
__closest fit__
** square board. Let's do an actual example:**

`> `
**F(7);**

`> `
**length(F(7));**

`> `

**We could write F(7) into the closest fit square by:**

** 340282**

366920

938463

463374

607431

768211

457 (here some
__excess__
** over the 6 by 6 square)**

or by:

3402823

6692093

8463463

3746074

3176821

1457

(here some
__shortfall__
** under the 7 by 7 square) **

**Okay, the individual digits are not occuping squares.**

**Now **
__define the variables__
**, and record their **
__approximate relationship__
**:**

**Let **
** - having **
__m__
__ digits__
** when expressed in the base 10 - be written in a closest fit square board (with some possible excess or shortfall) **

with side length
** **
__inches__

**Let the digits (occuping equal height and width) be written at **
** **
__digits per inch__

__Approximate__
** connection: **
** giving: **
**.**

**Now to compute the side length **
** - first in inches - of the square**
** **
**it would take to write out (really big) Fermat numbers.**

**First, though, I wish to note this: I **
**could**
** work with the following procedure - which is formed in the obvious way from the earlier ones:**

`> `
**# inches := proc(n, N) **

# lprint(`The approximate side length - in INCHES -

# of the closest fit square in which to write the

# digits of the`, n,`-th. Fermat number is`,

# evalf(sqrt(floor((2^n)*log[10](2.0)) + 1))/N)

# end:

`> `

**but **
__instead__
** I am going to work with this **
__slight alteration__
** of it:**

`> `
**inches := proc(n, N) **

lprint(`The approximate side length

of the closest fit square in which to

write the digits of the`, n,`-th. Fermat

number at`, N, `digits per inch is`,

evalf(sqrt((2^n)*log[10](2.0)))/N, `INCHES`)

end:

`> `

**in which I have **
__omitted__
**:**

**the ' +1 ' (that's of no real consequence)**

**the use of '**
**floor**
**' (that **
**is**
** of consequence because there are computational time problems when large values of '**
**n**
**' are involved)**

`> `

__Examples__
** (Note. Remove the comment sign before the following command, and then execute).**

`> `
**# length(F(19));**

`> `
**sqrt(157827.0);**

`> `

**Thus to write **
** out in a square would essentially require a 397 by 397 grid, and so if the digits were written at **
** - **
__four digits per inch__
** - then the **
__side length of the square__
** would be about **
** inches**

`> `

`> `
**inches(19, 4);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 19 -th. Fermat

number at 4 digits per inch is 99.31843183 INCHES

`> `

`> `
**inches(70, 4);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 70 -th. Fermat

number at 4 digits per inch is 4712970738. INCHES

`> `

**And, of course, if we double the number of digits per inch then it halves the length of the square:**

`> `
**inches(70, 8);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 70 -th. Fermat

number at 8 digits per inch is 2356485369. INCHES

`> `
**inches(70, 16);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 70 -th. Fermat

number at 16 digits per inch is 1178242684. INCHES

`> `

**Those squares are BIG (which comes as no surprise, though it causes a problem to ones brain to visualise!)**

__Let's convert to miles__
** [I grew up with inches, feet, yards, ... , miles, and so apologies to anyone used to centimetres etc. Make your own conversions]. Recall there are:**

**12 inches in a foot**

**3 feet in a yard**

**1760 yards in a mile**

`> `
**miles := proc(n, N) **

lprint(`The approximate side length

of the closest fit square in which to

write the digits of the`, n,`-th. Fermat

number at`, N, `digits per INCH is`,

evalf(sqrt((2.0^n)*log[10](2.0)))/(N*12*3*1760),

`MILES`)

end:

`> `

`> `
**miles(70, 16);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 70 -th. Fermat

number at 16 digits per INCH is 18596.00196 MILES

`> `

`> `
**miles(700, 32);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 700 -th. Fermat

number at 32 digits per INCH is .6206377985e99 MILES

`> `

**And there - as you see - Maple has moved to the level of exponential notation, and this is the place to start converting to **
__Light Years__
**.**

__First, though__
**, I want to make an **
__optical change__
** to the '**
**lprint**
**' line in the **
**miles**
** proc: instead of saying "the number of miles is X ... ", I want to alter it to: "the number of miles is 10 to the power of ... ",**

`> `
**miles2 := proc(n, N) **

lprint(`The approximate side length

of the closest fit square in which to

write the digits of the`, n,`-th. Fermat

number at`, N, `digits per INCH is 10 to

the POWER of`,

log[10](evalf(sqrt((2.0^n)*log[10](2.0)))/(N*12*3*1760)),

`MILES`)

end:

`> `

`> `
**miles2(70, 16);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 70 -th. Fermat

number at 16 digits per INCH is 10 to

the POWER of 4.269419583 MILES

`> `
**miles2(700, 16);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 700 -th. Fermat

number at 16 digits per INCH is 10 to

the POWER of 99.09386822 MILES

`> `

__Now, what I really want is to let__
**, to see the **
__GIGANTIC__
** size of the Fermat number **
**:**

`> `
**miles2(382447, 4);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 382447 -th. Fermat

number at 4 digits per INCH is 10 to

the POWER of 57558.34481 MILES

`> `

__Three final things to do__
**:**

**Convert to **
__light years__

__Greatly increase__
** the value of **
** **

**Examine some **
__down-to-earth distances__

**First, recall the definition of a '**
**light year**
**':**

__Definition__
**. A **
__light year__
** is the **
**distance traversed by light in one year.**

__Working assumption__
**s. **

__The speed of light is 186,000 miles per second__

__The year has 365 days__

__Converting miles to light years__
**:**

`> `
**light_year := 186000*60*60*24*356; # miles**

`> `

**I want to express that as an approximate power of 10:**

`> `
**log[10](5721062400000.0);**

`> `

**And so a **
__light year is__
** **
** **
__miles__
**, which explains the following alteration of the **
**miles3**
** procedure:**

`> `
**LIGHT_YEARS := proc(n, N) **

lprint(`The approximate length of

the closest fit square in which to write

the digits of the`, n,`-th. Fermat

number at`,

N, `digits per INCH is 10 to

the POWER of`,

log[10](evalf(sqrt((2.0^n)*log[10](2.0)))/(N*12*3*1760)) - 12.75747668,

`LIGHT YEARS`)

end:

`> `

**And thus - writing at 4 digits per inch - the Fermat number **
** would require a square whose size was give by:**

`> `
**LIGHT_YEARS(382447, 4);**

`The approximate length of `

the closest fit square in which to write

the digits of the 382447 -th. Fermat

number at 4 digits per INCH is 10 to

the POWER of 57545.58733 LIGHT YEARS

`> `

**That is a very great distance (with which I cannot mentally come to terms), and it is linguistically meaningless to merely call it '**
__astronomically large__
**.'**

**Just think for a moment of some of the great astronomical distances, from say the nearest star (apart from our own sun, which is a mere 9 light minutes away from us), through some nearby nebula (Andromeda at 2,000,000 light years), and so on ... .**

**And suppose we went to **
__atomic levels of writing__
**, let's say we set: **

`> `
**LIGHT_YEARS(382477, 10^30);**

`The approximate length of `

the closest fit square in which to write

the digits of the 382477 -th. Fermat

number at 1000000000000000000000000000000 digits per INCH is 10 to

the POWER of 57520.70484 LIGHT YEARS

`> `

**That **
__relatively small reduction__
** in the length should **
__not__
** come as a surprise. Finally, let's consider some examples nearer to home, and fix **
** at 4.**

**I grew up in a small town (Bailieboro), about **
__60 miles__
** from here:**

`> `
**miles(49, 4);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 49 -th. Fermat

number at 4 digits per INCH is 51.36468395 MILES

`> `

**The moon is about 250,000 miles away:**

`> `
**miles(74, 4);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 74 -th. Fermat

number at 4 digits per INCH is 297536.0313 MILES

`> `

**The sun is about 92,000,000 miles away:**

`> `
**miles(90, 4);**

`The approximate side length `

of the closest fit square in which to

write the digits of the 90 -th. Fermat

number at 4 digits per INCH is 76169224.01 MILES

`> `