Next Article in Journal
Opinion Diversity and the Resilience of Cooperation in Dynamical Networks
Previous Article in Journal
Collocation Methods for High-Order Well-Balanced Methods for Systems of Balance Laws
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Revisited Carmichael’s Reduced Totient Function

by
Samir Brahim Belhaouari
1,*,†,
Yassine Hamdi
2,† and
Abdelouahed Hamdi
3,†
1
College of Science and Engineering, Hamad Bin Khalifa University Education City, Doha 24404, Qatar
2
Applied Mathematics Engineering, Ecole Polytechnique of Paris, 91128 Palaiseau, France
3
Department of Mathematics, Statistics and Physics, College of Arts and Sciences, Qatar University, Doha 2713, Qatar
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2021, 9(15), 1800; https://doi.org/10.3390/math9151800
Submission received: 13 May 2021 / Revised: 9 July 2021 / Accepted: 13 July 2021 / Published: 29 July 2021

Abstract

:
The modified Totient function of Carmichael λ ( . ) is revisited, where important properties have been highlighted. Particularly, an iterative scheme is given for calculating the λ ( . ) function. A comparison between the Euler φ and the reduced totient λ ( . ) functions aiming to quantify the reduction between is given.

1. Introduction

More than a century ago, Robert D. Carmichael (1879–1967) [1] introduced a function λ ( . ) known as Carmichael’s function. This λ ( n ) is spread as the reduced totient function which can be seen as the smallest divisor of Euler’s totient function verifying Euler’s theorem. This Totient function is deeply related to prime numbers and integer orders [2,3,4,5], mainly used for primality testing. Furthermore, the reader may cross in the literature that the Carmichael function represents the exponent ( λ ( n ) represents the order of the largest cyclic subgroup of Z / n Z * ) of the group Z / n Z * .
In this paper, we aim to analyse λ ( . ) and we present some of its important properties. Mainly, we give in Lemma 3 a suitable iterative scheme for calculating the values of λ ( n ) . In addition, we prove the following estimation
λ ( n ) 1 2 N 1 φ ( n ) , N is   the   number   of   odd   prime   divisors   of n ,
which could be considered an indicator of reduction of the modified totient function and we can easily duduce that
lim sup n φ ( n ) λ ( n ) = + .
The complexity of finding the inverse function of Carmichael λ ( . ) is more complex than finding the inverse of Euler function.

2. Preliminaries

In the literature, Carmichael’s new totient function named λ is defined as follows: For the prime decomposition of a given natural integer
n = i = 1 k p i k i , λ ( n ) = L C M λ ( p 1 k 1 ) , , λ ( p k k k ) ,
where (LCM denotes the least common multiple.) we have:
λ ( p i k i ) = 2 k i 2 If p i = 2 and k i > 2 , p i k i 1 ( p i 1 ) o t h e r w i s e .
We refer to [1,2,6,7] and references therein for the properties of the function λ .
Figure 1 and Figure 2 produce the first thousand values of λ ( p ) and φ ( p ) . The points on the top lines represent λ ( p ) = p 1 = φ ( p ) , when p is a prime number.
In this section, we show how we built the modified Totient function λ .
Euler theorem [1] states that if n and m are co-prime positive integers, then
m φ ( n ) 1 ( m o d n ) ,
where φ ( . ) is Euler’s Totient function. It is known that for any prime number p, we have φ ( p ) = p 1 since all the positive integers less than p are co-prime with p.
If p and q are two different primes, then
m k 1 ( p 1 ) 1 ( m o d p ) k 1 N , g c d ( m , p ) = 1 . m k 2 ( q 1 ) 1 ( m o d q ) k 2 N , g c d ( m , q ) = 1 .
The two integers k 1 and k 2 can be chosen in such a way that
k 1 ( p 1 ) = k 2 ( q 1 ) ,
then we obtain:
m k 1 ( p 1 ) + 1 m ( m o d p ) k 1 N , m N . m k 2 ( q 1 ) + 1 m ( m o d q ) k 2 N , m N .
We can also conclude the following
m k 1 ( p 1 ) + 1 m k 2 ( q 1 ) + 1 m ( m o d p q ) .
In the next definition, we introduce a new function related to the Totient function of Euler given as follows:
Definition 1.
Let n = p q
λ ( n ) = min { k 1 ( p 1 ) : k 1 ( p 1 ) = k 2 ( q 1 ) } = min { k 1 φ ( p ) : k 1 φ ( p ) = k 2 φ ( q ) } .
According to the above definition, we will have:
m λ ( p q ) + 1 m ( m o d p q ) , m N ,
and by using previous results, we can conclude the following Lemma.
Lemma 1.
Let p and q two different primes
  • If g c d ( m , p q ) = 1 , then
    m φ ( n ) 1 ( m o d p q ) m λ ( n ) 1 ( m o d p q ) .
  • For all integer m, then
    m φ ( n ) + 1 m ( m o d p q ) m λ ( n ) + 1 m ( m o d p q ) .
Let us generalize the previous Lemma for n = Π i = 1 N p i , N N , but the function λ n = Π i = 1 N p i needs also to be generalized.
From Euler theorem, we can write
m k i ( p i 1 ) + 1 m ( m o d p i ) ( m , k i ) N 2 m k i ( p i 1 ) 1 ( m o d p i ) k i N , g c d ( m , p i ) = 1 .
Then, the function λ at n = Π i = 1 N p i should be defined as follows:
λ Π i = 1 N p i = min k 1 ( p 1 1 ) : k i ( p i 1 ) = k 1 ( p 1 1 ) , i = 1 , 2 , , N = min k 1 φ ( p 1 ) : k i φ ( p i ) = k 1 φ ( p 1 ) , i = 1 , 2 , , N .
Example 1.
If n = 105 = 3 × 5 × 7 , then
λ ( n ) = m i n { 2 k 1 : 2 k 1 = 4 k 2 = 6 k 3 } = 12 ,
so,
m 12 k 0 + 1 m ( m o d 3 × 5 × 7 ) ( m , k 0 ) N 2 m 12 k 0 1 ( m o d 3 × 5 × 7 ) k 0 N , g c d ( m , 3 × 5 × 7 ) = 1 .
The following proposition provides a recursive scheme to evaluate the λ ( n ) for different situations.
Proposition 1.
λ ( n ) can be calculated by a recursive way:
λ ( p 1 p 2 ) = ( p 1 1 ) ( p 2 1 ) g c d ( p 1 1 ; p 2 1 ) .
λ ( p 1 p 2 p 3 ) = λ ( p 1 p 2 ) ( p 3 1 ) g c d ( λ ( p 1 p 2 ) ; p 3 1 ) .
and
λ ( Π j = 1 i p j ) = λ ( Π j = 1 i 1 p j ) ( p i 1 ) g c d ( λ ( Π j = 1 i 1 p j ) ; p i 1 ) .
Again, we generalize our Lemma 1 result for n = p i k , where k 2 , as follows:
Lemma 2.
If n = Π i = 1 N p i n i and K = max i { n i } , then
λ ( n ) = min k 1 φ ( p 1 n 1 ) : k i φ ( i n i ) = k 1 φ ( p 1 n 1 ) , i = 1 , 2 , , N ,
m k ϕ ( n ) 1 ( m o d n ) k N , g c d ( m , n ) = 1 , m k λ ( n ) + K m K ( m o d n ) m , k N ,
Proof. 
  • If g c d ( n , m ) = 1 , then
    m p i k p i k 1 1 ( m o d p i k ) m p i k p i k 1 + 1 m ( m o d p i k ) .
  • For k 2 , we have
    p i k p i k 1 + 1 = p i k 1 ( p i 1 ) + 1 2 k 1 + 1 k .
  • It concludes that
    If g c d ( m , n ) = 1 , then
    m p i k p i k 1 + 1 m ( m o d p i k ) .
    If p i | m , then
    m p i k p i k 1 + 1 m l k + r m l k m r 0 ( m o d p i k ) m ( m o d p i k ) ,
    where p i k p i k 1 + 1 = l k + r .
    Therefore,
    m k i ( p i k p i k 1 ) + k m k ( m o d p i k ) , m N ,
    we can say that if n = Π i = 1 N p i n i and K = max i { n i } , then
    m k i ( p i k p i k 1 ) + K m K ( m o d p i n i ) , m N , k i N .
Proposition 2.
λ ( p 1 n 1 p 2 n 2 1 ) = ( p 1 n 1 p 1 n 1 1 ) ( p 2 n 2 p 2 n 2 1 ) g c d p 1 n 1 p 1 n 1 1 ; p 2 n 2 p 2 n 2 1 ,
and
λ ( Π j = 1 i p j n j ) = λ ( Π j = 1 i 1 p j n j ) ( p i n i p i n i 1 ) g c d λ ( Π j = 1 i 1 p j n j ) ; p i n i p i n i 1 .
Proof. 
The proof will be given after Lemma 5. □
Lemma 3.
λ ( Π j = 1 i p j n j ) = p 1 n 1 p 1 n 1 1 L C M p k n k p k n k 1 g c d ( p k n k p k n k 1 ; p 1 n 1 p 1 n 1 1 ) : 2 k i .
Proof. 
According to the definition of λ :
λ ( Π j = 1 i p j n j ) : = min k 1 ( p 1 n 1 p 1 n 1 1 ) : k j , k 1 ( p 1 n 1 p 1 n 1 1 ) = k j ( p j n j p j n j 1 ) , 2 j i . : = min k 1 ( p 1 n 1 p 1 n 1 1 ) : 2 j i : k j , ( p j n j p j n j 1 ) | k 1 ( p 1 n 1 p 1 n 1 1 )
and using the fact that
I f a | b c a g c d ( a , b ) | c ,
we obtain
λ ( Π j = 1 i p j n j ) = min k 1 ( p 1 n 1 p 1 n 1 1 ) : 2 j i , p j n j p j n j 1 g c d ( p j n j p j n j 1 ; p 1 n 1 p 1 n 1 1 ) | k 1 ,
and the smallest k 1 satisfying the above relation is the least common multiple (LCM) of p j n j p j n j 1 g c d ( p j n j p j n j 1 ; p 1 n 1 p 1 n 1 1 ) , which completes the proof. □
Lemma 4.
λ ( Π j = 1 i + 1 p j n j ) = λ ( Π j = 1 i p j n j ) × p i + 1 n i + 1 p i + 1 n i + 1 1 g c d ( p i + 1 n i + 1 p i + 1 n i + 1 1 ; p 1 n 1 p 1 n 1 1 ) × g c d ( A i + 1 ; B 1 )
where
A i + 1 = p i + 1 n i + 1 p i + 1 n i + 1 1 g c d ( p i + 1 n i + 1 p i + 1 n i + 1 1 ; p 1 n 1 p 1 n 1 1 ) , B 1 = λ ( Π j = 1 i p j n j ) p 1 n 1 p 1 n 1 1 .
Proof. 
We will use the following two results:
L C M ( a 1 , , a i + 1 ) = L C M L C M ( a 1 , , a i ) , a i + 1 ,
and
L C M ( a , b ) = a b g c d ( x , y ) .
According to Lemma 3 and (11), we have by setting d j = g c d ( p j n j p j n j 1 ; p 1 n 1 p 1 n 1 1 ) :
λ ( Π j = 1 i + 1 p j n j ) = p 1 n 1 p 1 n 1 1 L C M L C M p j n j p j n j 1 d j : 2 j i . ; A i + 1
which is equivalent to
λ ( Π j = 1 i + 1 p j n j ) = p 1 n 1 p 1 n 1 1 L C M λ ( Π j = 1 i p j n j ) p 1 n 1 p 1 n 1 1 ; A i + 1 .
Furthermore, according to (12), we obtain:
λ ( Π j = 1 i + 1 p j n j ) = λ ( Π j = 1 i p j n j ) × A i + 1 g c d λ ( Π j = 1 i p j n j ) p 1 n 1 p 1 n 1 1 ; A i + 1 ,
which proves Lemma 4. □
Lemma 5.
g c d ( z ; x y ) = g c d ( z ; x ) g c d z g c d ( z ; x ) ; y .
Proof. 
Let d = g c d ( z ; x ) , then z = d c and x = d a where g c d ( a , c ) = 1 . Thus
g c d ( z ; x y ) = g c d ( d c ; d a y ) = d g c d ( c ; a y ) = d × g c d ( c ; y ) = g c d ( z ; x ) g c d z g c d ( z ; x ) ; y .
Proof of Proposition 2. 
By applying Lemma 5 to the denominator of the expression in Lemma 4, with x = p 1 n 1 p 1 n 1 1 , y = B i and z = p i + 1 n i + 1 p i + 1 n i + 1 1 we will obtain:
λ ( Π j = 1 i + 1 p j n j ) = λ ( Π j = 1 i p j n j ) p i + 1 n i + 1 p i + 1 n i + 1 1 g c d p i + 1 n i + 1 p i + 1 n i + 1 1 ; λ ( Π j = 1 i p j n j ) .
The Carmichael and Euler functions are a very important theoretic functions having a deep relationship with prime numbers. Figure 1 and Figure 2 shows the first thousand values of λ ( n ) and φ ( n ) , respectively, where the Euler function has been defined as φ ( n ) = ( p 1 n 1 p 1 n 1 1 ) . . ( p k n k p k n k 1 ) , where p 1 n 1 . . p k n k is the prime factorization of the integer n. □

3. Properties of λ ( . )

In this section, we present some properties of the new Totient function λ ( . ) .
  • k N , p r i m e p : λ ( p k ) = φ ( p k ) = p k p k 1 .
  • If n = 2 Π i = 1 k p i k i , p i are odd primes and k is any positive integer, then
    λ ( n ) = λ ( n / 2 ) .
  • If n = 2 p , where p is an odd prime, then λ ( 2 p ) = φ ( p ) ;
  • If n = 2 k , k > 2 , then λ ( 2 k ) = φ ( 2 k ) / 2 .
  • If n > 5 then λ ( n ) is an even number.
  • If p and q are two odd primes, and k and l are any natural numbers, then
    λ ( p k q l ) 1 2 φ ( p k q l ) .
  • If m , p , and q are three odd primes, and k , l and s are any natural numbers, then
    λ ( m k p l q r ) 1 4 φ ( m k p l q r ) .
  • Let ( p i ) i be an increasing sequence of primes, then:
    λ i = 1 k p i n i = λ i = 1 k 1 p i n i p k n k p k n k 1 g c d λ i = 1 k 1 p i n i , p k 1 .
  • λ i = 1 k p i n i = λ j = 1 , j i k p j n j p i n i p i n i 1 g c d λ j = 1 , j i k p j n j , p i n i p i n i 1 .
Proof. 
  • From the definition of the function λ ( n ) , we can conclude the following:
    k N , p r i m e p : λ ( p k ) = φ ( p k ) = p k p k 1 .
  • If n = 2 Π i = 1 k p i k i , p i are primes and k is any integer, then λ ( n ) = λ ( n / 2 ) . Indeed,
    λ ( n ) = λ Π i = 1 k p i k i ( 2 1 ) G C D Π i = 1 k p i k i , 2 1 = λ Π i = 1 k p i k i .
  • For all odd primes p, we have: λ ( 2 p ) = λ ( p ) = p 1 . Indeed,
    λ ( 2 p ) = λ ( p ) ( from P 2 ) = φ ( p ) ( from P 1 ) = p 1 ( from def . of φ ( p ) ) .
  • If n = 2 k , k > 2 , then λ ( 2 k ) = φ ( 2 k ) / 2 .
    We note the following
    m 2 k 2 k 1 1 = ( m 2 k 2 2 k 3 1 ) ( m 2 k 2 2 k 3 + 1 ) ( m 2 k 1 2 k 2 + 1 ) .
    Therefore, for any odd number m, we have
    m 2 k 2 2 k 3 1 m 2 k 2 2 k 3 + 1 0 ( m o d ( 2 3 ) ) .
    If k > 3 , we can factor more the term
    m 2 k 2 k 1 1 = ( x 4 + 1 ) ( x 2 + 1 ) ( x + 1 ) ( x 1 ) , x = m 2 k 3 2 k 4 .
    By the Euler theorem, we have m 2 k 2 k 1 1 0 ( m o d ( 2 5 ) ) .
    By induction, we can easily prove that for any odd integer m and for all integer k > 2 the following statement is true:
    m 2 k 1 2 k 2 1 = 0 ( m o d ( 2 k ) ) .
    Thus,
    λ ( 2 k ) = 2 k 1 2 k 2 = φ ( 2 k ) / 2 .
  • For n > 5 , we have the following:
    • λ ( 3 ) = 2 , λ ( 2 ) = 1 .
    • λ ( 4 ) = 2 2 1 ( 2 1 ) = 2 .
    • λ ( 5 ) = 4 .
    • λ ( p ) = p 1 , which is even for any odd prime p.
    • λ ( p k ) = p k 1 ( p 1 ) , which is even for any odd prime p.
    • λ p 1 k 1 p 2 k 2 = λ ( p 1 k 1 ) ( p 2 k 2 p 2 k 2 1 G C D λ ( p 1 k 1 ) , p 2 k 2 p 2 k 2 1 = p 1 k 1 1 ( p 1 1 ) p 2 k 2 1 ( p 2 1 ) G C D p 1 k 1 1 ( p 1 1 ) , p 2 k 2 1 ( p 2 1 )
      (a)
      For some integer l, if 2 l divides G C D p 1 k 1 1 ( p 1 1 ) , p 2 k 2 1 ( p 2 1 ) , then 2 l | p 2 k 2 1 ( p 2 1 ) .
      (b)
      p 1 1 is an even number.
      (a) and (b) imply that λ p 1 k 1 p 2 k 2 is even.
  • According to Lemma 3, we have:
    λ p k q l = λ ( p k ) ( q l q l 1 ) G C D λ ( p k ) , q l q l 1 λ ( p k ) ( q l q l 1 ) 2 , Property 5 . φ p k q l 2 , Property 1 .
  • According to Lemma 3, we have:
    λ m k p r q s = λ ( m k p r ) ( q s q s 1 ) G C D λ ( m k p r ) , q s q s 1 λ ( m k p r ) ( q s q s 1 ) 2 , Property 5 . φ ( m k p r ) ( q s q s 1 ) 4 , Property 6 . φ ( m k p r q s ) 4 .
  • Obvious, it is enough to prove that g c d λ i = 1 k 1 p i n i , p k = 1 .
  • Obvious.
Corollary 1.
λ i = 1 k p i n i 1 2 k 1 φ i = 1 k p i n i .
Proof. 
From properties P6 and P7, the proof can be completed by induction.
As a conclusion, we can easily prove the following limit
lim sup n φ ( n ) λ ( n ) = + ,
by considering the subsequence n k = p 1 . p 2 . . p k , where ( p 1 , p 2 , , p k ) are the first k-consecutive odd primes.
Again, since the primes are not bounded, we can conclude that
lim inf n φ ( n ) λ ( n ) = 1 .

4. Computations of λ ( n ) versus φ ( n )

In this section, we compare the magnitude of the Euler function φ ( n ) versus the Carmichael function λ ( n ) see Table 1 and Table 2.
Figure 3 and Figure 4 present, respectively, the ratio φ ( n ) λ ( n ) when n is a product of two primes, respectively, three primes.

5. Conclusions

In this paper, we presented how we built the modified Totient function of Carmichael λ ( . ) . Important properties have been highlighted, particularly the given iterative scheme for calculating the λ ( . ) function. Some preliminary numerical results comparing the Euler φ and the reduced totient λ ( . ) functions aiming to quantify the reduction between them are given (see Table 1 and Table 2 and Figure 3, Figure 4 and Figure 5). Figure 6 and Figure 7 express the frequency of n for getting the value of λ ( n ) ; in other words, determining the cardinal of the following set:
n : λ ( n ) = k , k is a given positive integer .
Furthermore, it may be worthwhile investigating more results in Corollary 1 by finding a better upper-bound.

Author Contributions

Conceptualization, S.B.B. and A.H.; methodology, Y.H.; validation, S.B.B. and Y.H.; formal analysis, A.H.; investigation, S.B.B.; writing—original draft preparation, A.H.; writing—review and editing, S.B.B. and A.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Acknowledgments

The publication of this article was funded by the Qatar National Library.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Carmichael, R.D. On composite numbers p which satisfy the Fermat congruence ap−1 ≡ 1mod(p). Am. Math. Mon. 1912, 19, 22–27. [Google Scholar]
  2. Erdos, P.; Pomerance, C.; Schmutz, E. Carmichael’s lambda function. Acta Arith. 1991, 58, 363–385. [Google Scholar] [CrossRef] [Green Version]
  3. Padberg, F. Elementare Zahlentheorie; Spektrum Akademischer Verlag: Heidelberg/Berlin, Germany, 1996. [Google Scholar]
  4. Riesel, H. Prime Numbers and Computer Methods for Factorization; Birkhäuser Boston: Basel, Switzerland; Berlin, Germany, 1994. [Google Scholar]
  5. Contini, S.; Croot, E.; Shparlinski, I.E. Complexity of Inversing the Euler Function. Math. Comput. 2006, 75, 983–996. [Google Scholar] [CrossRef] [Green Version]
  6. Ford, K.; Hu, Y.Y. Divisors of the Euler and Carmichael functions. Acta Arith. 2007, 133. [Google Scholar] [CrossRef] [Green Version]
  7. Ge, Y. A Note on the Carmichael Function. Available online: https://www.math.sinica.edu.tw/www/file_upload/summer/crypt2017/data/2015/[20150707][carmichael].pdf (accessed on 1 May 2021).
Figure 1. The first 1000 values of the Carmichael function.
Figure 1. The first 1000 values of the Carmichael function.
Mathematics 09 01800 g001
Figure 2. The first 1000 values of the Euler function.
Figure 2. The first 1000 values of the Euler function.
Mathematics 09 01800 g002
Figure 3. The Ratio between Carmichael and Euler functions for n less than 45,000.
Figure 3. The Ratio between Carmichael and Euler functions for n less than 45,000.
Mathematics 09 01800 g003
Figure 4. The Ratio between Carmichael and Euler functions for n less than 155,000.
Figure 4. The Ratio between Carmichael and Euler functions for n less than 155,000.
Mathematics 09 01800 g004
Figure 5. φ ( n ) λ ( n ) for all n 20,000.
Figure 5. φ ( n ) λ ( n ) for all n 20,000.
Mathematics 09 01800 g005
Figure 6. The Cardinal of the Inverse of Carmichael function.
Figure 6. The Cardinal of the Inverse of Carmichael function.
Mathematics 09 01800 g006
Figure 7. The Cardinal of the Inverse of Euler function.
Figure 7. The Cardinal of the Inverse of Euler function.
Mathematics 09 01800 g007
Table 1. Comparison between Carmichael and Euler functions for the product of two primes.
Table 1. Comparison between Carmichael and Euler functions for the product of two primes.
n 3 × 5 5 × 7 5 × 29 5 × 61 11 × 31 17 × 97 37 × 73 73 × 109
λ ( n ) 4122860309672216
φ ( n ) λ ( n ) 224410163636
Table 2. Comparison between Carmichael and Euler functions for the product of three primes.
Table 2. Comparison between Carmichael and Euler functions for the product of three primes.
n 3 × 5 × 7 5 × 13 × 97 7 × 31 × 61 11 × 31 × 71 13 × 19 × 113 37 × 73 × 109
λ ( n ) 129660210108216
φ ( n ) λ ( n ) 4481801002161296
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Belhaouari, S.B.; Hamdi, Y.; Hamdi, A. Revisited Carmichael’s Reduced Totient Function. Mathematics 2021, 9, 1800. https://doi.org/10.3390/math9151800

AMA Style

Belhaouari SB, Hamdi Y, Hamdi A. Revisited Carmichael’s Reduced Totient Function. Mathematics. 2021; 9(15):1800. https://doi.org/10.3390/math9151800

Chicago/Turabian Style

Belhaouari, Samir Brahim, Yassine Hamdi, and Abdelouahed Hamdi. 2021. "Revisited Carmichael’s Reduced Totient Function" Mathematics 9, no. 15: 1800. https://doi.org/10.3390/math9151800

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop