22
Sizing factorials - Second approach Mathematical essay by Dave Coulson, 2017 [email protected]

More factorials (pdf)

Embed Size (px)

Citation preview

Sizing factorials - Second approach

Mathematical essay by Dave Coulson, 2017

[email protected]

This second approach to finding the size of a factorial number works better than the first and is arguably easier to use, though you will have to be familiar with basic logs, and the more you memorise, the better it will work.

So to start with, here are some logs (base 10) rounded to the first few digits: Log 2 = 0.3 Log 3 = 0.477 Log 4 = 0.6 Log 5 = 0.7 Log 6 = 0.777 Log 7 = 0.84 Log 8 = 0.9 Log 9 = 0.95

Log 2 = 0.3 Log 3 = 0.477 Log 4 = 0.6 Log 5 = 0.7 Log 6 = 0.777 Log 7 = 0.84 Log 8 = 0.9 Log 9 = 0.95

Note that Log 4 is double the size of Log 2 and that Log 8 is triple the size.

Log 2 = 0.3 Log 3 = 0.477 Log 4 = 0.6 Log 5 = 0.7 Log 6 = 0.777 Log 7 = 0.84 Log 8 = 0.9 Log 9 = 0.95

Log 5 is the complement of Log 2

Log 2 = 0.3 Log 3 = 0.477 Log 4 = 0.6 Log 5 = 0.7 Log 6 = 0.777 Log 7 = 0.84 Log 8 = 0.9 Log 9 = 0.95

Log 9 is double the size of Log 3

Log 2 = 0.3 Log 3 = 0.477 Log 4 = 0.6 Log 5 = 0.7 Log 6 = 0.777 Log 7 = 0.84 Log 8 = 0.9 Log 9 = 0.95

Log 6 is the sum of Log 2 and Log 3

Log 2 = 0.3 Log 3 = 0.477 Log 5 = 0.7 Log 7 = 0.84

All these associations are consequences of the properties of logs. So really, the only logs you need to memorise are these ones. The rest can be unzipped from these few.

To get the logs of 20, 30, 40 etc, just put a 1 in front of the basic logs.

Log 20 = 1.3 Log 30 = 1.477 Log 40 = 1.6 Log 50 = 1.7 Log 60 = 1.777 Log 70 = 1.84 Log 80 = 1.9 Log 90 = 1.95

It occurred to me that the size of a factorial might be obtained using the techniques and thinking that serves differential equations. After all, the size of a factorial is itself a mathematical function that can be differentiated.

factorialaofSize

The interesting thing about this formula is that you already know its derivative without using calculus: For example, at n=10, the factorial function magnifies tenfold, which means the Log of the factorial must grow by 1. What this is saying is that multiplying by 10 adds one digit to the size of the answer.

10 !nLognSize

It occurred to me that the size of a factorial might be obtained using the techniques and thinking that serves differential equations. After all, the size of a factorial is itself a mathematical function that can be differentiated.

factorialaofSize 10 !nLognSize

n Log n Size dnd

10

In general, tacking one more multiplier onto the end of a factorial increases the number of digits in it by the log of the new number.

Two points that should be clarified before I go any further: With this definition of size I am allowing the number of digits in a factorial to be a real number instead of a whole number. For example, 20 factorial has 1.3 more digits in it than 19 factorial. This may seem a little weird but allowing for bits of a digit preserves accuracy when several of these bits are added together.

Also, size, as I have defined it here, is no longer the number of digits in a number but the number of digits behind the leading digit, the order of magnitude in other words. This is the number after the capital E when a number is expressed in scientific notation.

So if I now treat this as a differential equation, I can use some representative slope to jump across an interval of, say, ten numbers.

n Log n Size dnd

10

n Log n Size nSize ?10 10 10

Where the question mark acknowledges that I have to choose a value somewhere between n and n+10 that provides a good average for the slope.

The best ‘average’ for the slope (in the absence of better information) is the midpoint.

n Log n Size nSize 510 10 10

This formulation will allow me to jump straight from 5 factorial to 15 factorial, using the Log of 10 as a pivot point. Log values below log 10 will be slightly lower in value, and log values above 10 will be slightly higher in value, so the deviations should cancel out somewhat.

Log Size Size 1010515 10

5 factorial is 120, which has size microscopically higher than 2.

12110215 Size

My calculator says that 15 factorial is 1.3 x 1012

Therefore 15 factorial is a thirteen-digit number.

25

3.11102

20101010525 1010

Log Log Size Size

We can streamline this process if we confine ourselves to jumps of ten centred on multiples of 10.

25 factorial is therefore a number with 26 digits in it.

( 25 factorial is 1.5 x 1025 )

405.13.1110235 Size

Larger sizes within the same definition can be obtained very quickly.

566.15.13.1110245 Size

548.16.15.13.1110255 Size

I am using minus signs to indicate that a number is slightly smaller than indicated by the digits. An accumulation of minus signs gives me a hint at how far below the indicated number the true answer is.

I can get the sizes of factorials for numbers between these flag point values. 18 is three digits inside the interval centred around 20, therefore I use three increments of log 20 as well as ten increments of log 10.

9.153.13110218 Size

As a byproduct, the decimal value in the answer implies that the leading digit in the factorial should be a higher digit rather than a lower digit. This proves to be the case, though the estimate has very poor predictive power for this leading digit.

I was not expecting great accuracy from this approach, but my spreadsheet shows these results to be very accurate, within half a percent of the true values for all numbers up to 70 factorial and possibly beyond. I did not check that far.

Some more examples:

4.223.18110223 Size

3492325.163.1110231 Size

The decimal digit in Size(23) hints that its leading digit could be a 2 or a 3.

24 factorial = 2.5 x 1022.

4.223.18110223 Size

In principle there is no limit to how far you can go with this process, but the number of additions becomes hard to manage after a while. A spreadsheet could do it, but of course if you are going to use a spreadsheet then you will use the factorial button instead of an approximation.

The process is intended for in-the-head calculation, which means its practical limit is somewhere below 50 factorial.

But now something interesting has happened, because I am a human being and human beings tend to remember some of what they see often, and I have now had reason to look at the factorial of 25 several times, and noticed that the factorial of 25 is a number that has 25 digits in it. That makes it one of the only numbers on the factorial curve that has as many digits in it as the value of the source number. I can use that as a benchmark now for estimating the sizes of factorials above and below 25 factorial. 30 factorial will have 5 or more digits in it, and 18 factorial will have two or more digits less.

5.32

5.1525

3052530

Log Size Size

10 x 6.2 ! 30 32

A better estimate would come from remembering the log value for the range of numbers to be covered.

It’s proof that the more numbers you memorise the less computing you have to do.

[END]