FASCINATING FACTORIALS

## Some Interesting Observations

----------------------------------------------------------------------------------------

Introduction

The factorial of a natural number n is the product of the positive integers less than or equal to n. This is written as n! and pronounced as n factorial.

For example,

5! = 1 * 2 * 3 * 4 * 5 = 120

The special case 0! is defined to have value 0!=1

The notation n! was introduced by Christian Kramp in 1808.

The first few factorials for n=0, 1, 2, ... are 1, 1, 2, 6, 24, 120, ... (Sloane's A000142).

The Table 1 shows the value of all factorials up to 52.

Table 1

n n Factorial (n!)
0

1

1

1

2

2

3

6

4

24

5

120

6

720

7

5040

8

40320

9

362880

10

3628800

11

39916800

12

479001600

13

6227020800

14

87178291200

15

1307674368000

16

20922789888000

17

355687428096000

18

6402373705728000

19

121645100408832000

20

2432902008176640000

21

51090942171709440000

22

1124000727777607680000

23

25852016738884976640000

24

620448401733239439360000

25

15511210043330985984000000

26

403291461126605635584000000

27

10888869450418352160768000000

28

304888344611713860501504000000

29

8841761993739701954543616000000

30

265252859812191058636308480000000

31

8222838654177922817725562880000000

32

263130836933693530167218012160000000

33

8683317618811886495518194401280000000

34

295232799039604140847618609643520000000

35

10333147966386144929666651337523200000000

36

371993326789901217467999448150835200000000

37

13763753091226345046315979581580902400000000

38

523022617466601111760007224100074291200000000

39

20397882081197443358640281739902897356800000000

40

815915283247897734345611269596115894272000000000

41

33452526613163807108170062053440751665152000000000

42

1405006117752879898543142606244511569936384000000000

43

60415263063373835637355132068513997507264512000000000

44

2658271574788448768043625811014615890319638528000000000

45

119622220865480194561963161495657715064383733760000000000

46

5502622159812088949850305428800254892961651752960000000000

47

258623241511168180642964355153611979969197632389120000000000

48

12413915592536072670862289047373375038521486354677760000000000

49

608281864034267560872252163321295376887552831379210240000000000

50

30414093201713378043612608166064768844377641568960512000000000000

51

1551118753287382280224243016469303211063259720016986112000000000000

52

80658175170943878571660636856403766975289505440883277824000000000000

The n! gives the number of ways in which n objects can be permuted. For example, six numbers which can be made from possible permutations of three digits 1, 2, 3 are 123, 132, 231, 213, 312 and 321. So 3! = 6.

How big is the factorial

For any positive integer n, we calculate n! by multiplying together all integers up to and including n, that is, n! = 1 * 2 * 3 ......* n. For example:
10! = 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 = 3628800

Unfortunately there is no shortcut formula for n!, we have to do all of the multiplication. On the other hand, there is a famous approximate formula, named after the Scottish mathematician James Stirling (1692-1770), that gives a pretty accurate idea about the size of n!.

Stirlings formula gives an approximation for n! as given below:

n! ~ √(2nπ)(n/e)n

Since factorial involves only multiplication of whole numbers, Stirlings formula relates to an expression involving square roots, π and e (the base of the natural logarithm). This is really surprising.

One interesting fact to know is that for every n, Stirlings approximation gives an underestimate for n!:

Stirlings formula is used to approximate large factorials and has many applications in science and mathematics.

Stirlings approximation for the first ten factorial numbers:
1! ~ 0.92
2! ~ 1.92
3! ~ 5.84
4! ~ 23.51
5! ~ 118.02
6! ~ 710.08
7! ~ 4980.39
8! ~ 39902.39
9! ~ 359536.87
10! ~ 3598695.62

We can see that the relative error for 1! is
(1! - .92)/1! = .0800
while for 10! it is
(10! - 3598695.62)/10! = .0083, ten times smaller.
So as n gets larger, the relative error goes on reducing.

Number of Trailing Zeros in Factorials

Factorials starting with 5!, have zeros at the end. Let's try to find out number of trailing zeros in n!.
Each zero at the end of n! comes from a factor of 10. For example, 10! has two zeros at the end, one of which comes from multiplying the 2 and the 5.
10! = 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 = 3628800

Since there is always an excess of 2's, the number of trailing zeros in n! is equal to the number of 5's that go into n!.

Every fifth number contributes a factor of 5, so the total number of 5's that factor n! should be about n/5. Since this isn't an integer, we ignore the fractional part and retain the integer part denoted as ⌊n/5⌋.

So the number of trailing zeros in 10! is ⌊10/5⌋ = 2

But for 26! the formula ⌊n/5⌋ gives ⌊26/5⌋ = 5, whereas there are 6 trailing zeros as can be seen from Table 1.

This is due to the fact that we have not taken into account the fact that number 25 contributes two factors of 5. That adds the extra one zero. So after taking into account the powers of 5 the number of trailing zeros in n! can be computed as

f(n) = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + ⌊n/625⌋ + ...

Apart from above formula, following simple procedure can be used to find number of trailing zeros in a factorial.

Step 1: Divide the number by 5, note down the Quotient and ignore the remainder
Step 2: If the Quotient is greater than 5, go to step 1
Step 3: Add all Quotients

For example let us compute number of trailing zeros in 52!.

Quotient of 52/5 = 10
Quotient of 10/5 = 2
adding quotients we get 10 + 2 = 12
So there are 12 trailing zeros in 52!.

The number of trailing zeros in first few factorials for n=0, 1, 2, ... are 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, ... (Sloane's A027868 ).

Factorion, amicable factorion and magic factorion

The only positive integers having the property that each one is equal to the sum of the factorials of its digits are 1, 2, 145 and 40585 .

1 = 1!
2 = 2!
145 = 1! + 4! + 5!
40585 = 4! + 0! + 5! +8! +5!

These four numbers have been referred to as factorions . The factorion 40585 was discovered in 1964 by R Dougherty.

Let us denote Sum of Factorials of Digits of a number n by SFD(n). If n = SFD(n), then n is known as factorion. For example 145 = SFD(145) = 1! + 4! + 5!. As stated above, the only factorions are 1, 2, 145 and 40585 (Sloane's A014080 ). It is interesting to note that the factorion of an n-digit number cannot exceed n·9!.

Let us now consider two integers n1 and n2. If SFD(n1) = n2 and also SFD(n2) = n1, then (n1, n2) can be termed as a pair of Amicable Factorion.

The only pairs of numbers having the property that each number in the pair is equal to the sum of the factorials of digits of the other number in the pair are (871, 45361) and (872, 45362).

SFD(871) = 8! + 7! + 1! = 45361 and SFD(45361) = 4! + 5! + 3! + 6! + 1! = 871
SFD(872) = 8! + 7! + 2! = 45362 and SFD(45362) = 4! + 5! + 3! + 6! + 2! = 872

So these are the only two possible pairs of amicable factorions (Sloane's A214285 ).

For any positive integer n, if we iterate the function SFD(n) and produce sequence SFD(n), SFD[SFD(n)], SFD[SFD[SFD(n)]] ...., which can be denoted by SFDk(n) for k = 1,2,3 ...., then the sequence { SFDk(n)} can be termed as SFD sequence. If for some value of k, SFDk(n) = n, then the sequence SFD(n), SFD2(n) .... SFDk(n), can be termed as factorion cycle of period k.

In fact for SFD (n) = n, k = 1, we get factorians. For SFD2(n) = n, k = 2, we get factorion cycle of period 2, which has been termed as amicable factorions, i.e. SFD2(871) = 871 and SFD2(872) = 872.

There is only one factorion cycle of period 3 and the smallest number of the cycle is 169.

SFD(169) = 363601
SFD2(169) = SFD(363601) = 1454
SFD3(169) = SFD(1454) = 169

It has also been noted that there does not exist any factorion cycle of period higher than 3. So, for k >3, SFDk(n) can not be equal to n. The only factorion cycle of period 3 can be termed as Magic factorion cycle and the smallest number of the cycle i.e. 169 as Magic Factorion.

For any positive integer n, SFD sequence will always enter into one of the following factorion cycles (Sloane's A188284 ) :

i) Factorion cycle of period 1 i.e. factorions 1, 2, 145 and 40585.
ii) Factorion cycle of period 2 i.e. Amicable factorion SFD2(871) or 871 45361871 and SFD2(872) or 872 45362 872.
iii)Factorion cycle of period 3 i.e. Magic factorion cycle SFD3(169) or 169 363601 1454 169.

The investigation of all numbers up to 2 x 109 revealed that about 95% of numbers enter into the magic factorion cycle SFD3(169). In other words, if any arbitrary number n is taken and function SFD(n) is iterated k time, then the probability that SFDk(n) will end up in SFD3(169) cycle is about 95% .

Factorions of other kinds:

Clifford A. Pickover introduced the following generalizations in his book "Keys to Infinity" :

1. Factorions of the Second Kind which are formed by the product of the factorials of each of their digits.
Except the trivial examples of 1 and 2, no other example of factorions of the second kind is known in base 10.

2. Factorions of the Third Kind which are formed by grouping digits :
An example is abcdef = (ab)! + c! + d! + (ef)!
Any grouping of digits are allowed for factorions of the third kind.

Some examples of factorions of the third kind are:

51090942171710544079 = 5! + 1! + 0! + 9! + 0! + 9! + 4! + 21! + 7! + 1! + 7! + 1! + 0! + 5! + 4! + 4! + 0! + 7! + 9!
51090942171710982398 = 5! + 1! + 0! + 9! + 0! + 9! + 4! + 21! + 7! + 1! + 7! + 1! + 0! + 9! + 8! + 2! + 3! + 9! + 8!
403291461126605635584809043 = 4! + 0! + 3! + 2! + 9! + 1! + 4! + 6! + 1! + 1! + 26! + 6! + 0! + 5! + 6! + 3! + 5! + 5! + 8! + 4! + 8! + 0! + 9! + 0! + 4! + 3!
403291461126605635584814796 = 4! + 0! + 3! + 2! + 9! + 1! + 4! + 6! + 1! + 1! + 26! + 6! + 0! + 5! + 6! + 3! + 5! + 5! + 8! + 4! + 8! + 1! + 4! + 7! + 9! + 6!

Factorions in other bases:

All positive integers are factorions in base 1, 1 is a factorion in every base, and 2 is a factorion in every base greater than 2.

The table 2 lists all of the factorions in bases up to and including base 16.

Table 2

Base Factorions
2

1, 10

3

1, 2

4

1, 2, 13

5

1, 2, 144

6

1, 2, 41, 42

7

1, 2

8

1, 2

9

1, 2, 62558

10

1, 2, 145, 40585

11

1, 2, 24, 44, 28453

12

1, 2

13

1, 2, 83790C5B

14

1, 2, 8B0DD409C

15

1, 2, 661, 662

16

1, 2, 260F3B66BF9

It can be seen that 83790C5B is factorion in base 13 . This number can be represented as
8*137+3*136+7*135+9*134+0*133+12*132+5*131+11*130 = 519326767 and
8!+3!+7!+9!+0!+12!+5!+11! = 519326767
Similarly 625589 = 4128210 = 6!+2!+5!+5!+8! so 62558 is factorion in base 9 .

Lets now consider Factorions of the Second Kind which are formed by the product of the factorials of each of their digits. Though no example of Factorions of the Second Kind is known in base 10 except trivial 1 and 2 but there are many Factorions of the Second Kind in bases other than 10. For example 33 is Factorions of the Second Kind in base 11, as 3311 = 3610 = 3!*3!
Similarly 12750016 = 120960010 = 1!*2!*7!*5!*0!*0! so 127500 is Factorions of the Second Kind in base 16 .
Some other examples of Factorions of the Second Kind in different bases are 442123104345 , 25440006 , 503424203347 , 24607200008 , 4A400000012 etc.

Various Kinds of factorials like half, double, multi, hyper and super factorials

• Half factorial:

The factorial of half (½) is half of the square root of pi = (½)√π, and so (½)! = (½)√π.

Since the rule that "the factorial of any number is that number times the factorial of (1 smaller than that number) " is followed, so

(3/2)! = (3/2) × (1/2)! = (3/4)√π
(5/2)! = (5/2) × (3/2)! = (15/8)√π

Since (½)! = (½) × (-½)! , so (-½)! = √π

• Double factorial:

If n is a positive integer, then double factorial of n denoted by n!! can be defined as follows:

If n is even, n!! = n * (n-2) * (n-4) * (n-6) ..... * 6 * 4 * 2
If n is odd, n!! = n * (n-2) * (n-4) * (n-6) ..... * 5 * 3 * 1
If n is 0 or -1, n!! = 1
For example:
10!! = 10 * 8 * 6 * 4 * 2
9!! = 9 * 7 * 5 * 3 * 1

It may be noted that n!! is not the same as (n!)!. As 5!! = 5 * 3 * 1 = 15 and (5!)! = 120!, a much larger number than 5!!.

It can be seen that the double factorial is like factorial but omitting odd numbers from even factorials and vice versa.

The values of double factorial for n= 0, 1, 2, 3,....are 1, 1, 2, 3, 8, 15, 48, 105, 384, 945, 3840, 10395, 46080, 135135, 645120, 2027025, 10321920, 34459425, 185794560, 654729075, 3715891200, 13749310575, 81749606400, 316234143225, 1961990553600,..... (Sloane's A006882 ).

Double factorials can be written in terms of ordinary factorials.
If n is even say n = 2m then (2m)!! = 2m*m!

The values of double factorial of even numbers : (2m)!! = 2m*m!. for m= 0, 1, 2, 3,....are 1, 2, 8, 48, 384, 3840, 46080, 645120, 10321920, 185794560, 3715891200, 81749606400, 1961990553600, 51011754393600, 1428329123020800, 42849873690624000, 1371195958099968000,..... (Sloane's A000165 ).

If n is odd say n = 2m-1 then (2m-1)!! = (2m)!/(2m*m!)

The values of double factorial of odd numbers : (2m-1)!! = (2m)!/(2m*m!). for m= 0, 1, 2, 3,....are 1, 1, 3, 15, 105, 945, 10395, 135135, 2027025, 34459425, 654729075, 13749310575, 316234143225, 7905853580625, 213458046676875, 6190283353629375, 191898783962510625,..... (Sloane's A001147 ).

Double factorials can be defined recursively like ordinary factorials.
If n > 0 and 0! = 1,
n! = n * (n-1)!
n!! = n * (n-2)!!

Factorials can be written in terms of double factorials .
n! = n!! * (n-1)!!

• Multi factorial:

If m and n are positive integers, then triple factorial of n denoted by n!!! can be defined as follows:

If n = 3*m - 2, n!!! = n * (n-3) * (n-6) * (n-9) ..... * 7 * 4 * 1
If n = 3*m - 1, n!!! = n * (n-3) * (n-6) * (n-9) ..... * 8 * 5 * 2
If n = 3*m , n!!! = n * (n-3) * (n-6) * (n-9) ..... * 9 * 6 * 3
If n = 0, -1, -2, n!!! = 1
For example:
7!!! = 7 * 4 * 1
9!! = 9 * 6 * 3

The values of triple factorial for n= 0, 1, 2, 3,....are 1, 1, 2, 3, 4, 10, 18, 28, 80, 162, 280, 880, 1944, 3640, 12320, 29160, 58240, 209440, 524880, 1106560, 4188800, 11022480, 24344320, 96342400, 264539520, 608608000, 2504902400, 7142567040, 17041024000, 72642169600,..... (Sloane's A007661 ).

Factorials can be written in terms of triple factorials .
n! = n!!! * (n-1)!!! * (n-2)!!!

The multi factorial is a generalization of the double/triple factorial and can be defined as follows:

If m and n are positive integers and !!!..!(k times) is denoted by !k, then multi factorial of n denoted by n!k can be defined as follows:

If n = k*m - (k-1), n!k = n * (n-k) * (n-2*k) * (n-3*k) ..... * (1+k) * 1
.
.
.
If n = k*m - 1, n!k = n * (n-k) * (n-2*k) * (n-3*k) ..... * {(k-1)+k } * (k-1)
If n = k*m , n!k = n * (n-k) * (n-2*k) * (n-3*k) ..... * (k+k) * k
If n = 0, -1, -2,.... -(k-1), n!k = 1
For example:
13!4 = 13 * 9 * 5 * 1
14!4 = 14 * 10 * 6 * 2
15!4 = 15 * 11 * 7 * 3
16!4 = 16 * 12 * 8 * 4

Factorials can be written in terms of multi factorials .
n! = n!k * (n-1)!k * (n-2)!k ....{n-(k-1) }! k

• Hyper factorial:

The hyperfactorial is the product of consecutive integers, each raised to itself as an exponent. It is written as H(n) and defined by

H(n)=11 * 22 * 33 * 44........(n-1)(n-1) * nn

Thus, H(1) = 1, H(2) = 4, H(3) = 108 and so on.

The first few hyperfactorial for n=0, 1, 2, ... are 1, 4, 108, 27648, 86400000, 4031078400000, 3319766398771200000, 55696437941726556979200000, 21577941222941856209168026828800000, ... (Sloane's A002109).

The hyperfactorial function is similar to the factorial, but produces larger numbers. The rate of growth of this function, however, is not much larger than a regular factorial. For example H(1000) is only of the order of 101392926.

• Super factorial:

Neil Sloane and Simon Plouffe  in 1995 defined the superfactorial as the product of first n factorials. It can be written as sf(n) and defined by

sf(n)=1! * 2! * 3! * 4!........ n!

Thus, sf(1) = 1, sf(2) = 2, sf(3) = 12 and so on.

Also sf(n)=1n * 2(n-1) * 3(n-2) * 4(n-3)........(n-1)2 * n1

The first few superfactorial for n=0, 1, 2, ... are 1, 1, 2, 12, 288, 34560, 24883200, 125411328000, 5056584744960000, 1834933472251084800000, 6658606584104736522240000000, 265790267296391946810949632000000000, ... (Sloane's A000178).

The idea of superfactorial was extended in 2000 by Henry Bottomley to the superduperfactorial as the product of the first superfactorials.

The first few superduperfactorial for n=0, 1, 2, ... are 1, 1, 2, 24, 6912, 238878720, 5944066965504000, 745453331864786829312000000, 3769447945987085350501386572267520000000000, 6916686207999802072984424331678589933649915805696000000000000000, ... (Sloane's A055462).

The superfactorial of n as defined by Pickover  in 1995 is
n\$ = n!n!n!n!..n!

or as,
n\$=(n!) ↑↑(n!)

where ↑↑ denotes Knuth's up-arrow notation, Knuth defined a double arrow operator to denote iterated exponentiation. For example
3↑↑3 = 333 = 327 = 7625597484987

This sequence of superfactorials starts:
1\$ = 1
2\$ = 22 = 4
3\$ = 6↑↑6 = 666666

Factorial primes

The only factorial that is also a prime number is 2. However there are many primes which are one more or one less than a factorial.
Primes of the form n! - 1 and n! + 1 are known as factorial primes . For example:

The first few factorial primes are 2, 3, 5, 7, 23, 719, 5039, 39916801, 479001599, 87178291199, 10888869450418352160768000001, 265252859812191058636308479999999, 263130836933693530167218012159999999, 8683317618811886495518194401279999999 ... (Sloane's A088054).

n! - 1 is prime for n = 3, 4, 6, 7, 12, 14, 30, 32, 33, 38, 94, 166, 324, 379, 469, 546, 974, 1963, 3507, 3610, 6917, 21480, 34790, 94550, 103040, 147855, ...(Sloane's A002982 ).

n! + 1 is prime for n = 0, 1, 2, 3, 11, 27, 37, 41, 73, 77, 116, 154, 320, 340, 399, 427, 872, 1477, 6380, 26951, 110059, 150209,.... (Sloane's A002981 ).

Primes of the form n!! - 1 and n!! + 1 are known as double factorial primes .

n!! - 1 is prime for n = 3, 4, 6, 8, 16, 26, 64, 82, 90, 118, 194, 214, 728, 842, 888, 2328, 3326, 6404, 8670, 9682, 27056, 44318, ...(Sloane's A007749 ).

n!! + 1 is prime for n = 0, 1, 2, 518, 33416, 37310, 52608, .... (Sloane's A080778 ).

Primes of the form n!!! - 1 and n!!! + 1 are known as triple factorial primes .

n!!! - 1 is prime for n = 3, 4, 6, 8, 20, 26, 36, 50, 60, 114, 135, 138, 248, 315, 351, 429, 642, 5505, 8793, 12086, 13580, 23109, 34626, 34706, 56282, 57675, 58298, ...(Sloane's A084438 ).

n!!! + 1 is prime for n =0, 1, 2, 4, 5, 6, 7, 9, 10, 11, 17, 24, 29, 39, 40, 57, 58, 59, 91, 155, 175, 245, 359, 372, 597, 864, 977, 1077, 1327, 2076, 4798, 4975, 10830, 13453, 15472, 15948, 16116, 16681, 18037, 21725, 22326, 24753, 28565, 32659, 46487, 50649, 51393,, .... (Sloane's A037083 ).

Subfactorials

The subfactorial of n (denoted by !n) is the number of permutations of n object in which no object appears in its natural place, also called derangements.

For example, the only derangements of {1,2,3} are {2,3,1} and {3,1,2}, so !3=2. It may be noted that the arrangement {2,1,3) is not a derangement because it leaves 3 in its natural place.
Similarly, the derangements of {1,2,3,4} are {2,1,4,3}, {2,3,4,1}, {2,4,1,3}, {3,1,4,2}, {3,4,1,2}, {3,4,2,1}, {4,1,2,3}, {4,3,1,2}, and {4,3,2,1}, so !4=9.
The term subfactorial was introduced by Whitworth (Cajori 1993, p. 77).

The first few values of !n for n = 1, 2, ... are 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 32071101049, 481066515734... (Sloane's A000166).

The subfactorials satisfy the following recurrence relations:
!n = n[!(n-1)] + (-1)n
!n = (n - 1) [!(n-1) + !(n-2)]
Note that the factorial has a similar recurrence i.e.
n! = (n - 1) [(n-1)! + (n-2)!]

!17 is the smallest subfactorial containing all digits from 0 to 9, i.e. pandigital.

The only number (curiously prime) whose subfactorial is also prime is 3 as !3 = 2.

In base 10, the only number equal to the sum of subfactorials of its digits is 148349. 

148349 = !1 + !4 + !8 + !3 + !4 + !9

if n > 0 then !n is the integer closest to n!/e.

You have 6 balls in 6 different colors, and for every ball you have a box of the same color. How many derangements do you have, if no ball is in a box of the same color? The answer is subfactorial 6 i.e.

!6 = 6!*(1-1/1!+1/2!-1/3!+1/4!-1/5!+1/6!) = 265.

How many ways are there of putting n different letters into n letter boxes so that no letter ends up in the correct box ? This is again equal to subfactorial n.

Squares and factorials

There are only three square numbers known which are one more than a factorial. These are:

25 = 52 = 4! + 1
121 = 112 = 5! + 1
5041 = 712 = 7! + 1

Paul Erdos conjectured that these are the only such numbers called Brown numbers. The brown numbers are pairs of integers (x, y) satisfying the condition of Brocards problem i.e. x! + 1 = y2

The only factorial which is square is 1!. However there are squares which can be represented as sum of distinct factorials like:

4 = 22 = 0! + 1! + 2!
9 = 32 = 1! + 2! + 3!
25 = 52 = 1! + 4!
121 = 112 = 1! + 5!
144 = 122 = 4! + 5!
729 = 272 = 1! + 2! + 3! + 6!
841 = 292 = 1! + 5! + 6!
5041 = 712 = 1! + 7!
5184 = 722 = 4! + 5! + 7!
45369 = 2132 = 1! + 2! + 3! + 7! + 8!
46225 = 2152 = 1! + 4! + 5! + 6! + 7! + 8!
363609 = 6032 = 1! + 2! + 3! + 6! + 9!
403225 = 6352 = 1! + 4! + 8! + 9!
3674889 = 19172 = 1! + 2! + 3! + 6! + 7! + 8! + 10!
1401602635449 = 11838932 = 1! + 2! + 3! + 7! + 8! + 9! + 10! + 11! + 12! + 13! + 14! + 15!
(Sloane's A014597, A025494).

Product of factorials

The only known factorials which are products of factorials in an arithmetic progression of three or more terms are:

2! = 0! * 1! * 2!
6! = 1! * 3! * 5!
10! = 1! * 3! * 5! * 7!

The only factorials which can be represented as product of factorials of consecutive odd numbers are:

3! = 0! * 3!
6! = 1! * 3! * 5!
10! = 1! * 3! * 5! * 7!

The known non-trivial examples of factorials which can be represented as product of factorials are :

9! = 2! * 3! * 3! * 7!
10! = 6! * 7! = 3! * 5! * 7!
16! = 2! * 5! * 14!

Prime counting function and factorials

• There are 23 Numbers(n) such that sum of factorials of digits of n equals π(n) i.e. prime counting function.

These are 6500, 6501, 6510, 6511, 6521, 12066, 50372, 175677, 553783, 5224903, 5224923, 5246963, 5302479, 5854093, 5854409, 5854419, 5854429, 5854493, 5855904, 5864049, 5865393, 10990544, 11071599 (Sloane's A049529).

For example:
π(6500) = 6! + 5! + 0! + 0!
π(6501) = 6! + 5! + 0! + 1!

Out of 23 numbers mentioned above, there are only two primes i.e. 6521 and 5224903 .
π(6521) = 6! + 5! + 2! + 1!
π(5224903) = 5! + 2! + 2! + 4! + 9! + 0! + 3!

• Using Double factorial function :
π(34) = 3!! + 4!!
π(6288) = 6!! + 2!! + 8!! + 8!!
π(10982) = 1!! + 0!! + 9!! + 8!! + 2!!
π(11978) = 1!! + 1!! + 9!! + 7!! + 8!!

• Using Triple factorial function :
π(45) = 4!!! + 5!!!
π(117) = 1!!! + 1!!! + 7!!!
π(127) = 1!!! + 2!!! + 7!!!
π(2199) = 2!!! + 1!!! + 9!!! + 9!!!

• There are numbers(n) such that product of factorials of digits of n equals π(n) i.e. prime counting function, like 13, 1512, 1520, 1521, 12016, 12035, 226130351, 209210612202, 209210612212, 209210612220, 209210612221 (Sloane's A066457). It is interesting to note that 13 and 226130351 are primes.

For example:
π(13) = 1! * 3!
π(1512) = 1! * 5! * 1! * 2!
π(226130351) = 2! * 2! * 6! * 1! * 3! * 0! * 3! * 5! * 1!

Triangular Numbers and factorials

The triangular number Tn = n + (n-1) +...+ 2 + 1 can be regarded as the additive analog of the factorial n! = n·(n-1)...2·1.

The only known triangular numbers which are also factorials are 1, 6, 120. However there are other triangular numbers which can be represented as sum of distinct factorials like:

T(1) = 1 = 1!
T(2) = 3 = 1! + 2!
T(3) = 6 = 3!
T(15) = 120 = 5!
T(17) = 153 = 1! + 2! + 3! + 4! + 5!
T(108) = 5886 = 3! + 5! + 6! + 7!
T(284) = 40470 = 3! + 4! + 5! + 8!
T(286) = 41041 = 1! + 6! + 8!
T(8975) = 40279800 = 5! + 9! + 11!
(Sloane's A115647).

Can you find other examples?.

Eulers totient function and factorials

The Eulers totient function Φ (n) is the positive integers less than or equal to n that are relatively prime to n.

The only numbers n such that Φ (n) = sum of factorials of digits of n are 1, 67585, 84466, 854696.

Φ(1) = 1 = 1!
Φ(67585) = 46320 = 6! + 7! + 5! + 8! + 5!
Φ(84466) = 41808 = 8! + 4! + 4! + 6! + 6!
Φ(854696) = 404784 = 8! + 5! + 4! + 6! + 9! + 6!
(Sloane's A101697).

Arabian Nights factorial

One Thousand and One Nights is a collection of stories and folk tales compiled in Arabic during the Islamic Golden Age. It is often known in English as the Arabian Nights . The Arabian Nights factorial is the number x such that x! has 1001 digits. Horace Scudder Uhler calculated the value of 450! without the aid of an electronic computer, found that it had exactly 1001 digits, and so named it the Arabian Nights Factorial.

450! =
1733368733112632659344713146104579399677811265209051015569207509555333
0016834367506046750882904387106145811284518424097858618583806301650208
3472961813516675701719187004222809622372722306635280840380623123693426
7413503661010150883822049497092973901163679376616502373085389640390159
0836144149594432684204513784716402303182604094683993315061302563918385
3033415106067614624202058200069363520959674171831915387256175095213805
5678130919542980022927380334255355816459199629891236859854777117915846
1351340068905647127658164836377126303774923360078072307462008554355068
3614481266062811457609604991878134283979248405925045378494874250604884
8103657144795704678863574293671461517621914846974310297994974071448510
4716169664052397392602848408694007408998901127492905171514473431386633
3924920406615226923030438139605419660932242438092251372688517179043032
1405823844793611167856823697303623840462650789068800000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000

Some Interesting Observations

• 1! 10! 22! 1! = 11! 0! 2! 21!

It is interesting to note that the same digits are broken up into factorials in two different ways.

Can you find more examples?.

• 23! = 25852016738884976640000

23! is the least factorial in which the digits 0 to 9 appear at least once i.e. 23! is the smallest pandigital factorial.

• 23 = 1! + (2! + 2!) + (3! + 3! + 3!)
• 2! = 1! + 0!

The only factorial that is sum of two preceding factorials.

• There are only three numbers i.e. 1466, 81368, 372970 which are one more than the sum of the factorials of their digits.

1466 = (1! + 4! + 6! + 6!) + 1
81368 = (8! + 1! + 3! + 6! + 8!) + 1
372970 = (3! + 7! + 2! + 9! + 7! + 0!) + 1

• 372973 is the only number which is one less than the sum of the factorials of their digits.

372973 = (3! + 7! + 2! + 9! + 7! + 3!) - 1

• There are only two numbers i.e. 1, 2 which are equal to their factorials.

1! = 1
2! = 2

• n! < n n for all values of n
• π(47501) = - 4! + 7! - 5! + 0! - 1!. Where π(n) denotes prime counting function.

• Factorials as product of three consecutive numbers:

3! = 1 * 2 * 3 = 23 - 2
4! = 2 * 3 * 4 = 33 - 3
5! = 4 * 5 * 6 = 53 - 5
6! = 8 * 9 * 10 = 93 - 9
Can you find more examples?

• There are numbers n such that the sum of digits of n! is itself a factorial.

For example:

The sum of the digits of 4! is 2 + 4 = 3!.
The sum of the digits of 21966! is 362880 = 9!.
The sum of the digits of 176755! is 3628800 = 10!.
The sum of the digits of 182624820! is 6227020800 = 13!.

The numbers n such that the sum of digits of n! is itself a factorial for n = 0, 1, 2, ... are 0, 1, 2, 3, 4, 21966, 176755, 182624820 (Sloane's A228311 ).

Can you find others such that the digit sum of n! equal to some m! ?

-----------------------------------------------------------------------------------------------------

 George D. Poole, Integers and the sum of the factorials of their digits, Mathematics Magazine, 44 (1971) 278 -279.

 Clifford A. Pickover,  A. "The Loneliness of the Factorions." Ch. 22 in Keys to Infinity. New York: W. H. Freeman, pp. 169-171 and 319-320, 1995.

 C. Caldwell and G. L. Honaker, Jr., Is pi(6521)=6!+5!+2!+1! unique?, Math. Spectrum, 22:2 (2000/2001) 34-36.

 Gupta, Shyam Sunder "Sum of the factorials of the digits of integers" The Mathematical Gazette, 88(July 2004), pp.258-261.

 Abbott, Steve "SFD chains and factorion cycles" The Mathematical Gazette, 88(July 2004), pp.261-263.

 Guy, R. K. "Primes connected with factorials." §A2 in Unsolved Problems in Number Theory, 3rd ed. New York: Springer-Verlag, pp. 10-11, 2004.

 Guy, R. K. "Equal product of factorials." §B23 in Unsolved Problems in Number Theory, 3rd ed. New York: Springer-Verlag, pp. 123, 2004.

 Madachy, J. S. Madachy's Mathematical Recreations. New York: Dover, p. 167, 1979.

 Gardner Martin, "Factorial Oddities." Ch. 4 in Mathematical Magic Show: More Puzzles, Games, Diversions, Illusions and Other Mathematical Sleight-of-Mind from Scientific American. New York: Vintage, pp. 61 and 64, 1978.

 Pickover, Clifford A. "1001 Scheherazades " Ch. 75 in Wonders of Numbers: Adventures in Mathematics, Mind, and Meaning. Oxford, England: Oxford University Press, pp. 182-183 and 339, 2001.

 Sloane, N. J. A. and Plouffe, S. The Encyclopedia of Integer Sequences. San Diego, CA: Academic Press, 1995.

 Sloane, N. J. A. Sequences A000142, A027868 , A014080,A214285,A188284, A006882, A000165, A001147, A007661, A002109, A000178, A055462, A088054, A002981, A002982, A007749, A080778, A084438, A037083, A000166, A014597, A025494, A049529, A066457, A115647, A101697, and A228311, in "The On-Line Encyclopedia of Integer Sequences."

This page is created on 6th October, 2014.

Back Home