<<

THE GENERALIZED SUPERFACTORIAL, HYPERFACTORIAL AND FUNCTIONS

VIGNESH RAMAN

Abstract. This paper introduces a new generalized superfactorial function (referable to as nth- degree superfactorial: sf (n)(x)) and a generalized hyper- function (referable to as nth- degree hyperfactorial: H(n)(x)), and we show that these functions possess explicit formulae involving figurate numbers. Besides discussing additional number patterns, we also introduce a generalized primorial function and 2 related theorems. Note that the superfactorial def- inition offered by Sloane and Plouffe (1995) is the definition considered (and not Clifford Pickover’s (1995) superfactorial function: n$).

1. Introduction

Factorials, their numerous extensions into the complex region 1 and related func- tions 2 find themselves numerous applications in Combinatorics, (NT), Functional Analysis, Probability Theory - the list goes on. Unfortunately, not much research has been done on factorial-related functions in recent literature due to two possible reasons:

(1) Current research in NT is more oriented towards Analytical NT. (2) Current requirements for research and advancement in Combinatorics, NT and Diophantine Analysis (including algebraic manipulations) are satisfied by the current knowledge possessed about and its closely related functions; it may be so that effort of the mathematical community is being solely directed towards research about functions behaving as extensions of the factorial function into other number systems (eg: Luschny factorial), owing to their ready utility in applied math/real world applications.

Research pertaining to r- (figurate) numbers and factorial-related functions arXiv:2012.00882v1 [math.NT] 1 Dec 2020 motivated the investigation into their possible relation to extensions of the super- factorial and hyperfactorial functions (formulated in this very paper).

We review certain factorial-related functions and figurate numbers in section 2, followed by the introduction of the generalized superfactorial function and a proof for its explicit formula in section 3. Section 4 will feature a similar treatment of the generalized hyperfactorial function. Section 5 will visually elucidate the aforementioned functions and explore two other number product-patterns involving factorials, and Section 6 will focus on

1Hadamard’s Gamma function: Γ(z) and the Luschny Factorial function: L(z) 2Superfactorials: sf(n); Hyperfactorials: H(n); Multifactorials: n!(k) 1 2 VIGNESH RAMAN an extension of the primorial function. Section 7 involves application of group theory and modular arithmetic lemmas to formulate two theorems concerning the superfactorial functions. Finally, Section 8 introduces an extension of the Legendre formula to shed light on the factorization of generalized superfactorials.

2. Factorial-related functions and Figurate Numbers

2.1. The Superfactorial Function. Definition 2.1. The superfactorial function [1] is defined as the product of the first n factorials, i.e. n Y + (2.1) sf(n) = k! n ∈ Z , sf(0) = 1 k=1 It can also be defined recursively as follows: + sf(n + 1) = (n + 1)!(sf(n)); n + 1 ∈ Z , sf(0) = 1 Supplementaries: • It is analogous to the tetrahedral numbers,- it represents the products of factorials akin to the tetrahedral numbers representing the sum of summa- tions of successive natural numbers. • It can also alternatively be represented as (on refactorization): n Y n−k+1 + sf(n) = k , n ∈ Z k=1 • Its asymptotic growth is approximately[2]: ζ0(−1)− 3 − 3 − 3 1 + 1 1 +n+ 5 e 4 4n2 2n ∗ (2π) 2 2n (n + 1) 2n2 12

2.2. The Hyperfactorial function. Definition 2.2. The hyperfactorial function[3] is defined as the product of numbers from 1 to n raised to the power of themselves, i.e n Y k + (2.2) H(n) = k , n ∈ Z k=1 It can also be defined as follows: n Y n! H(n) = nP , n ∈ +, nP = k Z k (n − k)! k=1 Supplementaries: • The hyperfactorial for natural numbers gives the discriminants for the probabilists’ Hermite [4]: 2 tx− tx n! I e 2 Hen (x) = n+1 2πi C t • Its asymptotic growth rate is approximately[5]: 2 2 An(6n +6n+1)/12e−n /4; A → Glaisher Kinkelin constant THE GENERALIZED SUPERFACTORIAL, HYPERFACTORIAL AND PRIMORIAL FUNCTIONS3

Figure 1. Polygonal numbers

2.3. Figurate numbers. Definition 2.3. Figurate numbers are those numbers that can be represented by a regular geometrical arrangement of equally spaced points. Supplementaries: • The nth regular r-polytopic number (i.e. figurate numbers for the r-dimensional analogs of triangles) is given by[6]: n + r − 1 (2.3) P (n) = r r • The above formula essentially implies that (can be verified on addition of each term’s respective binomial-coefficient representation): k X (2.4) Pr+1(k) = Pr(i) i=1 • If the arrangement forms a regular polygon, the number is called a polyg- onal number. (Figure 1)[7].

3. The Generalized Superfactorial Function - GSF Definition 3.1. Define the nth-degree superfactorial as follows: x (n) Y (n−1) + (0) (3.1) sf (x) = sf (k), n ∈ Z , sf (x) ≡ x! k=1 We see that the first degree superfactorial is equivalent to the superfactorial defi- nition given by Sloane and Plouffe (1995): x (1) Y + sf (x) = sf(x) = k!, x ∈ Z k=1 We now give an explicit formula for the GSF. Theorem 3.2. The generalized superfactorial function is related to the r-simplex numbers (i.e.figurate numbers, Pn(k)) as follows: x x (n) Y P (k) Y P ((x−k)+1) + ≥ sf (x) = [(x − k) + 1] n = k n ; x ∈ Z ; n ∈ Z k=1 k=1 4 VIGNESH RAMAN

Proof. Theorem 3.2. is proven by using the Principle of Mathematical Induction.

Base Case: n = 0

x Y sf (0)(x) = x! = k1 [As noted in section 2.1] k=1 x Y P0((x−k)+1) = k [From equation (2.3), P0(n) = 1] k=1 = 1121 ··· (x − 1)1x1 = x1(x − 1)1 ··· 2111 = xP0(1)(x − 1)P0(2)(x − 2)P0(3) ··· 2P0(x−1)1P0(x) x Y = [(x − k) + 1]P0(k) k=1

Inductive Hypothesis:

x Y sf (m)(x) = [(x − k) + 1]Pm(k) k=1

To prove:

x x Y Y sf (m+1)(x) = [(x − k) + 1]Pm+1(k) = kPm+1((x−k)+1) k=1 k=1 Now,

x Y sf (m+1)(x) = sf (m)(k) [From equation (3.1)] k=1 x " k # Y Y = [(k − i) + 1]Pm(i) [From Inductive Hypothesis] k=1 i=1 1 2 x Y Y Y = [(1 − i) + 1]Pm(i) [(2 − i) + 1]Pm(i) ··· [(x − i) + 1]Pm(i) i=1 i=1 i=1 h i h i h i h i = 1Pm(1) 2Pm(1)1Pm(2) 3Pm(1)2Pm(2)1Pm(3) ··· xPm(1)(x − 1)Pm(2)(x − 2)Pm(3) ··· 1Pm(x)

 x  x−1   1  X X X        Pm(k)  Pm(k)  Pm(k) = 1 k=1 2 k=1 ··· x k=1 [On rearranging terms] h i h i = 1Pm+1(x) 2Pm+1(x−1) ··· xPm+1(1) [From equation 2.4] x x Y Y = kPm+1((x−k)+1) = [(x − k) + 1]Pm+1(k) k=1 k=1

 THE GENERALIZED SUPERFACTORIAL, HYPERFACTORIAL AND PRIMORIAL FUNCTIONS5

4. The Generalized Hyperfactorial Function - GHF Definition 4.1. Define the nth-degree hyperfactorial as follows: x x Y Y (4.1) H(n)(x) = H(n−1)(k); H(1)(x) ≡ H(x) = kk k=1 k=1 We now give an explicit formula for the GHF. Theorem 4.2. The generalized hyperfactorial function is related to the r-simplex numbers as follows: x (n) Y k[P ((x−k)+1)] + H (x) = k n−1 ; n ∈ Z k=1 Proof. Theorem 4.2. is proven by using the Principle of Mathematical Induction.

Base Case: n = 1 x x (1) Y k Y k[P0((x−k)+1)] H (x) = k = k [Since P0(ξ) = 1, ∀ ξ ∈ N] k=1 k=1

Inductive Hypothesis: x Y H(m)(x) = kk[Pm−1((x−k)+1)] k=1

To prove: x Y H(m+1)(x) = kk[Pm((x−k)+1)] k=1 x Y H(m+1)(x) = H(m)(k) [From equation (4.1)] k=1 x " k # Y Y = ii[Pm−1((k−i)+1)] [From Inductive Hypothesis] k=1 i=1 1 2 x Y Y Y = ii[Pm−1((1−i)+1)] ii[Pm−1((2−i)+1)] ··· ii[Pm−1((x−i)+1)] i=1 i=1 i=1 h i h i = 11·Pm−1(1)11·Pm−1(2) ··· 11·Pm−1(x) 22·Pm−1(1)22·Pm−1(2) ··· 22·Pm−1(x−1) h i ··· xx·Pm−1(1) [On rearranging terms]

 x  x−1   1  X X X 1·  2·  x·   Pm−1(k)  Pm−1(k)  Pm−1(k) = 1 k=1 2 k=1 ··· x k=1 = 11·Pm(x)22·Pm(x−1) ··· xx·Pm(1) [From equation 2.4] x Y = kk[Pm((x−k)+1)] k=1  6 VIGNESH RAMAN

5. Visual Exploration into Number Patterns Intuition behind the formulae of the superfactorial and hyperfactorial can be developed on observation of the number pattern they manifest themselves into (note: product of all numbers in a pattern is the output of the function). The below list will include some illustrations which will attempt to display the nature of the functions : (1)

sf 1(5) =1 ∗ 2 ∗ 3 ∗ 4 ∗ 5 1 ∗ 2 ∗ 3 ∗ 4 1 ∗ 2 ∗ 3 1 ∗ 2 1

(2)

H1(5) =5 ∗ 4 ∗ 3 ∗ 2 ∗ 1 5 ∗ 4 ∗ 3 ∗ 2 5 ∗ 4 ∗ 3 5 ∗ 4 5

(3)

sf 2(5) =1 ∗ 2 ∗ 3 ∗ 4 ∗ 5 1 ∗ 2 ∗ 3 ∗ 4 1 ∗ 2 ∗ 3 1 ∗ 2 1 1 ∗ 2 ∗ 3 ∗ 4 1 ∗ 2 ∗ 3 1 ∗ 2 1 1 ∗ 2 ∗ 3 1 ∗ 2 1 1 ∗ 2 1 1

(4)

H2(5) =5 ∗ 4 ∗ 3 ∗ 2 ∗ 1 4 ∗ 3 ∗ 2 ∗ 1 3 ∗ 2 ∗ 1 2 ∗ 1 1 5 ∗ 4 ∗ 3 ∗ 2 4 ∗ 3 ∗ 2 3 ∗ 2 2 5 ∗ 4 ∗ 3 4 ∗ 3 3 5 ∗ 4 4 5

(5)

M(8) =1 ∗ 2 ∗ 3 ∗ 4 ∗ 5 ∗ 6 ∗ 7 ∗ 8 1 ∗ 2 ∗ 3 6 ∗ 7 ∗ 8 1 ∗ 2 7 ∗ 8 1 8 THE GENERALIZED SUPERFACTORIAL, HYPERFACTORIAL AND PRIMORIAL FUNCTIONS7

(6) M(9) =1 ∗ 2 ∗ 3 ∗ 4 ∗ 5 ∗ 6 ∗ 7 ∗ 8 ∗ 9 1 ∗ 2 ∗ 3 ∗ 4 6 ∗ 7 ∗ 8 ∗ 9 1 ∗ 2 ∗ 3 7 ∗ 8 ∗ 9 1 ∗ 2 8 ∗ 9 1 9

(7) N(7) =1 ∗ 2 ∗ 3 ∗ 4 ∗ 5 ∗ 6 ∗ 7 2 ∗ 3 ∗ 4 ∗ 5 ∗ 6 3 ∗ 4 ∗ 5 4

(8) N(6) =1 ∗ 2 ∗ 3 ∗ 4 ∗ 5 ∗ 6 2 ∗ 3 ∗ 4 ∗ 5 3 ∗ 4

Item numbers 1 to 4 offers a visual insight into the pattern generated by the super- factorial and hyperfactorial (Degrees 1 and 2) functions. No.5 and No.6 portray a pattern not yet discussed in this paper. It (the pattern) is generated by the function M(x). On observation of values of M(1) to M(10), it will become apparent that an explicit formula certainly exists which is associated with a certain combination of the factorial, floor and ceiling functions. Indeed, the explicit formula happens to be: d x e−1 ! ! 2Y x!  x  M(x) = x!  d e − k !  b x c + k! 2 k=1 2

Item numbers 7 and 8 is yet another pattern which grows (as in, the pattern extends) in a nigh complimentary fashion to the aforementioned number pattern created by the function M(x). This function’s explicit formula happens to be:

d x e−1 2Y (x − k)! N(x) = k! k=0

6. The Generalized Primorial Function Definition 6.1. The primorial of x, p(x), is defined as the product of the first x th prime numbers [with Pk referring to the k prime]: x Y p(x) = (Pk) k=1 8 VIGNESH RAMAN

Before the introduction of the generalized primorial function, it is necessary to mention two other functions related to the prime factors of numbers: ω(x) evaluating the number of distinct prime factors of n, and Ω(x) evaluating the total number of prime factors of n. Note that the following result (Result 6.1) holds true because of the fact that all factors of a number’s primorial - by definition, the product of n distinct primes - are prime and distinct.

(6.1) ω(p(x)) = Ω(p(x)) = x

We now introduce the generalized (a.k.a. nth-degree) primorial function.

Definition 6.2. Define the nth-degree primorial as follows:

x (n) Y (n−1) (0) (6.2) p (x) = p (Pk); p (Pk) = Pk k=1

Note that p(1)(x) is, in fact, the original primorial function p(x). Now, based on the recently defined function, we introduce two more generalized functions.

Definition 6.3. Define the total number of distinct prime factors of the nth degree primorial of a x as follows:

(n) (n) αp (x) = ω(p (x))

Definition 6.4. Define the total number of prime of the nth degree pri- morial of a natural number x as follows:

(n) (n) βp (x) = Ω(p (x))

(n) We now take a look at a theorem involving the αp (x) function, preceded by a required lemma and its proof.

(n+1) (n) Lemma 6.5. αp (x) = αp (Px)

Proof.

(n+1) (n+1) αp (x) = ω(p (x)) x ! Y (n) = ω p (Pi) i=1  (n)   (n)   (n)   (n)  = ω p (P1) p (P2) ··· p (Px−1) p (Px) THE GENERALIZED SUPERFACTORIAL, HYPERFACTORIAL AND PRIMORIAL FUNCTIONS9

Now, observe that:

Px (n) Y (n−1) p (Px) = p (Pi) i=1  (n−1)   (n−1)  (n−1)  = p (P1) p (P2) ··· p (P(Px−1−1))

(n−1)  (n−1)   (n−1)   (n−1)  p (P(Px−1)) p (P(Px−1+1)) ··· p (P(Px−1)) p (PPx )

Px−1 Y (n−1)  (n−1)   (n−1)   (n−1)  = p (Pi) p (P(Px−1+1)) ··· p (P(Px−1)) p (PPx ) i=1

Px−1 Px Y (n−1) Y (n−1) = p (Pi) p (Pi) i=1 i=P(x−1)+1

Px (n) Y (n−1) = p (Px−1) p (Pi) By definition (6.2)

i=P(x−1)+1

(n)  (n)  The above factorization lets us know that p (Px−1) is a factor of p (Px) . On repeated usage of the aforementioned observation, it becomes clear that all the terms that are multiplied with each other, in the argument of the ω(x) function, are (n)  factors of p (Px) . Since each term is a product of exclusively prime numbers (n)  (n)  (and as mentioned before, a factor of p (Px) ), p (Px) is bound to encompass all the distinct prime factors of the ω(x) function’s argument. Ultimately, since ω(x) function evaluates only the total number of distinct prime factors,

 (n)   (n)   (n)  (n) (n) (6.3) ω p (P1) p (P2) ··· p (Px) = ω(p (Px)) = αp (Px)



Theorem 6.6.

(n) αp (x) = PPP = P (n−1) ; n ≥ 2 P· αp (x) ·Px Proof. Theorem 6.6. is proven by using the Principle of Mathematical Induction.

Base Case: n = 2 To prove:

(2) αp (x) = P (1) αp (x)

Proof. Note that P (1) = Px by result obtained in (6.1). αp (x)

" x # " x Pi # (2) h (2) i Y (1) Y Y (6.4) αp (x) = ω p (x) = ω p (Pi) = ω Pk i=1 i=1 k=1 10 VIGNESH RAMAN

The above equality follows from definitions 6.1., 6.2. and 6.3.

" x P # " P P P # Y Yi Y1 Y2 Yx (6.5) ω Pk = ω Pk Pk ··· Pk i=1 k=1 k=1 k=1 k=1     P Px−1 P Yx Y Yx Now, note that: Pk =  Pk  Pk. Because ω(x) simply counts

k=1 k=1 k=Px−1 total number of distinct factors, the right hand side of equation (6.5) is simply Px ! Y (1) equal to ω Pk . This is the same as ω(p (Px)) (from definition (6.1)), which k=1 is simply Px (from equation (6.1)). Therefore,

" P1 P2 Px # Px Y Y Y Y (1) (6.6) ω Pk Pk ··· Pk = ω( Pk) = ω(p (Px)) = Px k=1 k=1 k=1 k=1



Inductive Hypothesis:

(n) αp (x) = P (n−1) αp (x) To prove:

(n+1) αp (x) = P (n) αp (x) Now,

(n+1) (n) αp (x) = αp (Px) [Lemma (6.5)]

= P (n−1) [From Inductive Hypothesis] αp (Px)

= P (n) [Lemma (6.5)] αp (x)



(n) We now introduce a theorem involving the βp (x) function (total number of prime divisors of the nth degree primorial of a natural number x), and then give the proof for a lemma which is utilized to complete this proof:

Theorem 6.7. x (n) X (n−1) βp (x) = βp (Pk) ; n ≥ 2 k=1 THE GENERALIZED SUPERFACTORIAL, HYPERFACTORIAL AND PRIMORIAL FUNCTIONS11

Proof.

(n) (n) βp (x) = Ω(p (x)) x ! Y (n−1) = Ω p (Pk) k=1 h (n−1) i h (n−1) i h (n−1) i = Ω p (P1) p (P2) ··· p (Px)

(n−1) (n−1) (n−1) = Ω(p (P1)) + Ω(p (P2)) + ···Ω(p (Px)) ; [From Lemma (6.8)] (n−1) (n−1) (n−1) = βp (P1) + βp (P2) + ···βp (Px) ; [From Definition (6.4)] x X (n−1) = βp (Pk) k=1



Lemma 6.8.

n ! n Y X + Ω xi = Ω(xi); xi ≥ 1, n ∈ Z i=1 i=1

Proof. This proof essentially shows that the Ω function is completely additive. Let

∞ Y mij xi = Pj , i ∈ {1, 2, ···n} j=1

[8] be the canonical representation of the number xi where a finite number of mij th are positive & the rest are 0. Pj is the j . Now, since the Ω function counts the total number of prime factors of a number, note that:

 ∞  ∞ Y mij X Ω(xi) = Ω  Pj  = mij j=1 j=1

P∞ It is to be noted that ( j=1 mij ) is a convergent (i.e. results in a finite sum), since only a finite number of terms are positive integers (rest are 0). The RHS of Lemma 6.8 is, therefore, simply:

n n  ∞   ∞   ∞   ∞  X X X X X X Ω(xi) =  mij  =  m1j  +  m2j  + ···  mnj  i=1 i=1 j=1 j=1 j=1 j=1 ∞ X  (6.7) = m1j + m2j + ···mnj j=1

∞ n ! X X = mij j=1 i=1 12 VIGNESH RAMAN

Now, notice that LHS of Lemma 6.8 is simply:

n !  n  ∞  Y Y Y mij Ω xi = Ω   Pj  i=1 i=1 j=1

 ∞ ∞ ∞  Y m1j Y m2j Y mnj = Ω  Pj × Pj × · · · Pj  j=1 j=1 j=1

 ∞  Y m1j +m2j +···mnj = Ω  Pj  j=1

 ∞  Pn Y i=1 mij = Ω  Pj  j=1

∞ n ! X X = mij j=1 i=1



7. Modular arithmetic with superfactorials This section utilizes a mod b = c to mean that c is the unique remainder when a is divided by b, such that 0 ≤ c < b. We consider the remainder when the product of the first x positive integers is divided by the sum of the first x integers - i.e., consider x! mod Tx, where Tx is the th x . Note that Tx = P2(x). We first introduce three lemmas. Lemma 7.1. d  d mod ab = d mod a + a mod b a  d  Proof. Let d = p + ka; p ∈ [0, a − 1], and we have p = d mod a, while k = a .  d  Now let k = q + mb; q ∈ [0, b − 1], and we have q = k mod b = a mod b. Now, d = p + ka = p + (q + mb)a = p + aq + m(ab) But p + aq ≤ (a − 1) + a(b − 1) = ab − 1. d  d mod ab = p + aq = d mod a + a mod b ∴ a  Lemma 7.2. n ax mod n = ay =⇒ x mod = y gcd(a, n)

kn Proof. By definition, ax mod n = ay =⇒ ax = ay + kn =⇒ x = y + a . Now, if a and n are relatively prime, i.e. gcd(a, n) = 1, a necessarily divides k, since: a(x − y) ax = ay + kn =⇒ k = n THE GENERALIZED SUPERFACTORIAL, HYPERFACTORIAL AND PRIMORIAL FUNCTIONS13

k + We therefore have a ∈ Z , and so, with : kn k  n x = y + =⇒ x = y + n =⇒ x mod n = x mod = y a a gcd(a, n)

If a and n aren’t relatively prime, then let gcd(a, n) = d; a = md. Then, kn kn x = y + =⇒ x = y + a md k . Because m - n, m must divide k. Let m = α, then we have: n n n x = y + α =⇒ x mod = x mod = y d d gcd(a, n)

 Lemma 7.3. For all prime numbers p, (p − 2)! mod p = 1

Proof. Let Sp be the symmetric group on p elements. The order of Sp then, is |Sp| = p! = p(p − 1)!. From Sylow’s third theorem, we know that the number of n Sylow p-subgroups np of a finite group G divides m, where |G| = p m; n > 0, p - m. Therefore for G = Sp, it follows that np|(p − 1)!. Note that (p − 1)! is the total elements number of order p, and since each of the Sylow p-subgroups have exactly p − 1 of these elements, we have:

(7.1) np(p − 1) = (p − 1)! =⇒ np = (p − 2)!

Sylow’s third theorem also tells us that np ≡ 1 (mod p), and this along with equa- tion (7.1) ultimately gives us: (p − 2)! ≡ 1 (mod p) =⇒ (p − 2)! mod p = 1

 Theorem 7.4. $ % (0) x + sf (x) mod P2(x) = x! mod P2(x) = x  ; x ≥ 2, x ∈ Z pπ(x)+1 − 1

Proof. x! x! 2(x − 1)! = = x(x+1) P2(x) (x + 1) 2 Now, consider the following cases: (1)( x + 1) is an even number. (x + 1) (x + 1) (x + 1) = 2 = 2k; 1 < ≤ (x − 1), ∀x ∈ + ≥ 3 2 2 Z + 1! This means that k|(x−1)!, ∀x ∈ Z ≥ 3. Note that x = 1 gives 1∗(1+1) = 1. 2

(7.2) ∴ (x + 1) = 2k =⇒ x! mod P2(x) = 0 14 VIGNESH RAMAN

(2)( x + 1) is an odd . + (x + 1) = gq; 1 < {g, q} < (x − 1), ∀x ∈ Z > 3 If g 6= q, then qg|(x − 1)!. If q = g, note that (x + 1) = g2 =⇒ (x − 1) = g2 − 2. Note that since g2 − 2 > 2g, g(2g)|(x − 1)! and therefore g2|(x − 1)! =⇒ gq|(x − 1)!.

(7.3) ∴ (x + 1) = gq =⇒ x! mod P2(x) = 0 (3)( x + 1) is a prime number. Notice that in this case, (x + 1) - (x − 1)!, because no number from 1 to (x − 1), as well as their product (x − 1)!, has (x + 1) as their prime factor. Using lemma (7.1), we have: x(x + 1) x x x!  x! mod = x! mod + x mod (x + 1) 2 2 2 2 x (7.4) = 0 + (2(x − 1)! mod (x + 1)) 2 x = (2l) 2 Where 2(x − 1)! mod (x + 1) = 2l . Realize that employing lemma (7.2), we get (x − 1)! mod (x + 1) = l . Further, lemma (7.3) tells us that l = 1. So from equation (7.4), we finally have: x(x + 1) x (7.5) x! mod = (2l) = x 2 2 We therefore have, from equations (7.2),(7.3) and (7.5): x(x + 1)  0 x + 1 is composite (7.6) x! mod = 2 x x + 1 is prime This tells us that the LHS of (7.5) evaluates to x only if x + 1 is prime.

Now, the largest prime number less than or equal to x is simply pπ(x). So the smallest prime number greater than x is pπ(x)+1. So we can say, that the LHS of equation (7.6) evaluates to x, only if x + 1 = pπ(x)+1 =⇒ x = pπ(x)+1 − 1. Observe that the maximum value attainable by f(x) = x is 1, at x = pπ(x)+1−1 pπ(x)+1 − 1. For all other values of x, f(x) ∈ (0, 1). Therefore, taking the floor function of f(x) helps us get different discrete values, and the following holds:  x   0 x + 1 6= p (7.7) = π(x)+1 pπ(x)+1 − 1 1 x + 1 = pπ(x)+1 Multiplying the above equation by x, and realizing that this process results in its RHS being the same as that of equation (7.6) , we finally get: $ % x + x! mod P2(x) = x  ; x ≥ 2, x ∈ Z pπ(x)+1 − 1

 THE GENERALIZED SUPERFACTORIAL, HYPERFACTORIAL AND PRIMORIAL FUNCTIONS15

Theorem 7.5. ∀x > n + 1, x ∈ Z+,

n+1 $ % $ % X x pπ(x)+1 − i sf (n)(x) mod P (x) = 0 ⇐⇒ = 0 n+2 p − i x i=1 π(x)+1

Proof. First, let the falling factorial xn be defined as follows:

n factors z }| { xn = x(x − 1) ... (x − (n − 1))

Note that: x + n + 1 (x + n + 1)! (x + n + 1)(x + n) ··· (x + 1)x P (x) = = = n+2 n + 2 (n + 2)!(x − 1)! (n + 2)!

 x  P (x) = (x + n + 1)n+1 ∴ n+2 (n + 2)! Now,

x−1 Y (n + 2)! kPn((x−k)+1) (n) sf (x) k=1 (7.8) g(x) = = n+1 Pn+2(x) (x + n + 1) It is apparent in the above equation that if and only if any of the terms in the denominator (x + n + 1)n+1 is a prime number, then g(x) is not an .

 + (n)  (7.9) ∴ g(x) 6∈ Z ⇐⇒ sf (x) mod Pn+2(x) 6= 0 ⇐⇒

 + (n)  (7.10) g(x) ∈ Z ⇐⇒ sf (x) mod Pn+2(x) = 0     x (pπ(x)+1−i) jak j b k Now consider the terms and x , and note that 6= (pπ(x)+1−i) b a 0 ⇐⇒ a = b. Realize that π(x) + 1 is the smallest prime greater than x, and that for an integer i ∈ [1, n + 1], x = pπ(x)+1 − i would imply that one of the terms in (x + n + 1)n+1 is a prime (with the prime being x + i). So for none of the terms in (x + n + 1)n+1 to be a prime, it would require that:

$ % $ % x pπ(x)+1 − i + (7.11)  = 0, ∀i ∈ Z ; 1 ≤ i ≤ n + 1 pπ(x)+1 − i x

So we ultimately have, ∀x > n + 1, x ∈ Z+, based on (7.10) and (7.11),

n+1 $ % $ % X x pπ(x)+1 − i sf (n)(x) mod P (x) = 0 ⇐⇒ = 0 n+2 p − i x i=1 π(x)+1

 16 VIGNESH RAMAN

8. On the factors of superfactorials Legendre’s formula (otherwise referred to as de Polignac’s formula), gives us the number of times a prime number p divides into x!:

∞ X  x  (8.1) ν (x!) = p pi i=1

Where νp(x) is the standard notion for the p-adic order of x. Let

sf (n)  (n)  νp (x) ≡ νp sf (x)

sf (0) Then using this notation, we see that Legendre’s formula involves νp (x), since (0) sf (n) sf (x) = x!. We now present a proof of a sum-expression for νp (x).

Theorem 8.1.

x " ∞ !# X X  i  sf ν(n)(x) = P (x + 1 − i) ; n ∈ + p n−1 pk Z i=1 k=1 Proof. Base Case: n = 1

x x ∞ ! X X X  i  sf ν(1)(x) = ν (sf(x)) = ν (i!) = P (x + 1 − i) p p p 0 pk i=1 i=1 k=1

The above follows from 8.1, and the fact that νp(a · b) = νp(a) + νp(b) (where a & b are integers). Inductive Hypothesis:

x " ∞ !# X X  i  sf ν(m)(x) = P (x + 1 − i) ; m ∈ + p m−1 pk Z i=1 k=1 To Prove:

x " ∞ !# X X  i  sf ν(m+1)(x) = P (x + 1 − i) ;(m + 1) ∈ + p m pk Z i=1 k=1 Now,

x x sf (m+1) X  (m)  X sf (m) νp (x) = νp sf (i) = νp (i) i=1 i=1 x i " ∞ !# X X X  j  = P (i + 1 − j) m−1 pk i=1 j=1 k=1

x  ∞ ! x  X X  j  X = P (i + 1 − j)  pk m−1  j=1 k=1 i=j THE GENERALIZED SUPERFACTORIAL, HYPERFACTORIAL AND PRIMORIAL FUNCTIONS17

However, note that: x X Pm−1(i + 1 − j) = Pm−1(j + 1 − j) + Pm−1((j + 1) + 1 − j) ···· i=j

+ Pm−1((x − 1) + 1 − j) + Pm−1(x + 1 − j) x+1−j X = Pm−1(1) + Pm−1(2) ··· +Pm−1(x + 1 − j) = Pm−1(i) i=1

= Pm(x + 1 − j) [From equation 2.4] Therefore, as required, we have: x " ∞ ! # X X  j  sf ν(m+1)(x) = P (x + 1 − j) p pk m j=1 k=1  Corollary 8.1.1. x sf (n) X h (j−1) i + νp (x) = Pn−j(x + 1 − i)νp (x) ; {n, j} ∈ Z , n ≥ j i=1 The above is merely the result of exercise in algebra.

[9] x−sp(x) Another formula to express νp(x!) would be the following : νp(x!) = p−1 , where sp(x) is the sum of digits of the base-p expansion of x, i.e.

blogp(x)c X 1 s (x) = (x mod bn+1 − x mod bn) p bn n=0 sf (n) Extending this, we get the following corollary centred around νp (x), which can be proven in a fashion similar to that of Theorem 8.1. Corollary 8.1.2.

 x a a  1 X Xn X2 sf ν(n)(x) = P (x) − ··· s (a ) ; n ∈ + p p − 1  n+1 p 1  Z an=1 an−1=1 a1=1

References [1] Weisstein, Eric W. ”Superfactorial.” From MathWorld, A Wolfram Web Resource. http://mathworld.wolfram.com/Superfactorial.html [2] N.J.A. Sloane, Sequence A000178 in The On-Line Encyclopedia of Integer , http://oeis.org/A000178 [3] Weisstein, Eric W. ”Hyperfactorial.” From MathWorld, A Wolfram Web Resource. http://mathworld.wolfram.com/Hyperfactorial.html [4] N.J.A. Sloane, Sequence A002109 in The On-Line Encyclopedia of Integer Sequences, Alan Sokal http://oeis.org/A002109 [5] N.J.A. Sloane, Sequence A002109 in The On-Line Encyclopedia of Integer Sequences, Vaclav Kotesovec http://oeis.org/A002109 [6] Weisstein, Eric W. ”Figurate Number.” From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/FigurateNumber.html [7] Sloane, N. J. A. and Plouffe, S. Figure M2535 in The Encyclopedia of Integer Sequences. San Diego: Academic Press, 1995. 18 VIGNESH RAMAN

[8] Apostol, Tom M., Introduction to Analytic Number Theory - Springer International Student Edition, Eighth Narosa Publishing House Reprint (1998), ISBN: 978-81-85015-12-5 [9] Mihet¸, Dorel. ”Legendre’s and Kummer’s theorems again.” Resonance 15.12 (2010): 1111- 1121.