1 Introduction and Results

Let G be a finite group. If X is a nonempty subset of G, then we define \(\psi (X) =\sum _{x\in X} o(x)\) where o(x) is the order of x in G. In particular, if G has t nonidentity conjugacy classes, then

$$\begin{aligned} \psi (G)=1+\sum _{1\ne g\in G}o(g)=1+ \sum _{i=1}^t|cl(x_i)|o(x_i) \end{aligned}$$

where \(x_i\) is any element of the ith nonidentity conjugacy class and \(cl(x_i)\) is the set of all conjugates of \(x_i\) in G. We propose the following general question:

Question 1.1

What information about a group G can be obtained from \(\psi (G)\) and |G|?

There has a great deal of recent interest in sum of the element orders of finite groups (for example see [1, 2]). In general, the invariants \(\psi (G)\) and |G| do not determine G. For example, there exist nonisomorphic groups \(G_1\) and \(G_2\) of order \(n\in \{16, 27, 54, 96, 100\}\) such that \(\psi (G_1)=\psi (G_2)\). In [3], the authors showed that if G is a noncyclic group of order n, then \(\psi (G) < \psi (C_n)\) where \(C_n\) is the cyclic group of order n. In fact \(C_n\) is determined by the sum of the element orders and its cardinality.

In general, we have \(\psi (G)\le 1+t|G|\) where t is the number of nonidentity conjugacy classes in G (see Lemma 2.3). Therefore, it is interesting that we know the structure of groups for which the equality happens. So we have the following result.

Theorem 1.2

Let G be a finite group and t be the number of nonidentity conjugacy classes of G. Then \(\psi (G)=1+t|G|\) if and only if G is either a group of prime order or a nonabelian group of order pq where p and q are distinct primes.

Note that there exists a group G such that \(\psi (G)=1+t|G|\) for some positive integer t, but \(t+1\) is not the number of conjugacy classes of G. For example, \(G=C_6\times C_2\), \(\psi (G)=49\) and \(t=4\).

In view of the main result in [3], one can ask about the structure of groups having maximum the sum of the element orders among all noncyclic groups of the same order. In [4], the author found the structure of all groups for which the sum of the element orders is the greatest among all noncyclic nilpotent groups of the same order. Also recently in [5], the authors characterized groups with the second maximum sum of the element orders among all groups of the same cardinality for a specific positive integer. Here we find the second maximum value of \(\psi \) among all groups of the same square-free cardinality. Before we state another main result, we bring some notations in the following.

Suppose that M is a nonempty set containing some positive integers.

Then we recall \(M\times M\) is totally ordered under the lexicographic order \(\preceq \), where \((i, j)\prec (l, m)\) if and only if \(i < l \text { or}~~ (i=l~~ \text {and}~~ j < m)\).

If \(n=p_1p_2...p_k\) is a positive integer where \(p_1<...<p_k\) are primes(i.e., n is a square-free integer) and \(\Omega =\{1, 2,\cdots , k\}\), then denote by \(B_n=\{(i, j)\in \Omega \times \Omega : p_i|p_j-1\}\). Note that if \(B_n\) is empty, then every group of order n is cyclic. So we have the following result.

Theorem 1.3

Let \(n=p_1p_2...p_k\) be a positive integer where \(p_1<...<p_k\) are primes. In the above notations, if \(B_n\) is nonempty and (rs) is the minimum element of \(B_n\) under \(\preceq \), then the noncyclic group \(T=C_{\frac{n}{p_rp_s}}\times (C_{p_s}\rtimes C_{p_r})\) has the second maximum of \(\psi \) among all groups of order n. More precisely if G is a noncyclic group of order n, then \(\psi (G)\le \psi (T).\) If in addition \(G \ncong T\), then \(\psi (G)<\psi (T)\).

In Theorem 1.3, we characterized groups with the second maximum sum of the element orders among all groups of the same square-free cardinality. In fact we have the following corollary.

Corollary 1.4

Let n be a square-free positive integer such that \(B_n\) is nonempty. Then a unique group of order n with the largest Fitting subgroup has the maximum sum of the element orders among all noncyclic groups of order n.

Remark 1.5

We notice that the function \(\psi \) is not increasing among all groups of square-free order in terms of the orders of the Fitting subgroups. For example, if \(G=C_{65} \times ((C_7 \rtimes C_3) \rtimes C_2)\) and \(H=C_{10} \times (C_{91} \rtimes C_3)\), then we have \(|F(G)|=455\), \(|F(H)|=910\), \(\psi (G)=603351\) and \(\psi (H)=459711\).

We denote by F(G) the Fitting subgroup of G. Throughout this paper, p and \(p_i\) are primes and \(p_{i}<p_{i+1}\) for each positive integer i. In [6] the author was investigated the product of the element orders in finite groups.

2 Proof of Theorem 1.2

In the sequel, we use the following lemmas.

Lemma 2.1

Let A and B be groups. Then \(\psi (A\times B)\le \psi (A)\psi (B)\) and \(\psi (A\times B)=\psi (A)\psi (B)\) if and only if \(gcd(|A|,|B|)=1\).

The following result on square-free order group is probably well known.

Lemma 2.2

Let G be a group of square-free order. Then F(G), the Fitting subgroup of G, has a cyclic complement in G.

Proof

Since F(G) is a normal Hall subgroup of G, there is a subgroup H of G such that \(G=F(G)H\) and \(F(G)\cap H=1\). It is enough to show that H is cyclic. Since G is soluble, we have \(\frac{G}{F(G)}\) is embedded in Aut(F(G)). By the order of G, the subgroup F(G) is cyclic and so Aut(F(G) is abelian. Therefore \(\frac{G}{F(G)}\) is cyclic and so H is cyclic. This completes the proof. \(\square \)

We obtain the following bound for any finite group G with t nonidentity conjugacy classes.

Lemma 2.3

Let G be a nontrivial finite group with t nonidentity conjugacy classes. Then \(\psi (G)\le 1+t|G|\).

Proof

Suppose that A is a system of representatives for the set of conjugacy classes of G. Then \(|A|=t+1\) and so

$$\begin{aligned} \psi (G)=\sum _{x\in A}o(x)|cl(x)|=1+\sum _{1\ne x\in A}o(x)\frac{|G|}{|C_G(x)|}<1+t|G|. \end{aligned}$$

This completes the proof. \(\square \)

Proposition 2.4

Let G be a nontrivial finite group. Then \(C_G(x)= \langle x\rangle \) for every \(1\ne x\in G\) if and only if |G| is square-free with at most two prime devisors.

Proof

Suppose that \(C_G(x)= \langle x\rangle \) for every \(1\ne x\in G\). If |G| is prime, then there is nothing to prove. So assume that |G| is not prime. Then we claim that |G| is square-free with two prime divisors.

Suppose, for a contradiction, that \(p^2\) divides |G| for some prime p and consider \(P\in Syl_p(G)\). If \(P=\langle a\rangle \) for some \(a\in G\), then \(C_G(a^p)\ne \langle a^p\rangle \), a contradiction. So P is not cyclic. If we consider a nonidentity element \(z\in Z(P)\), then \(C_G(z)\ne \langle z\rangle \) which is a contradiction. Thus |G| is square-free. It follows from Lemma 2.2 that \(G=F(G)\rtimes H\), where F(G) and H are cyclic subgroups of G. If |F(G)| is not prime, then F(G) contains an element x with prime order. Since F(G) is cyclic, we conclude that \(F(G)\le \langle x\rangle \) and so \(C_G(x)\ne \langle x\rangle \), a contradiction. Thus |F(G)| is prime. Similarly |H| is prime and so |G| has two prime divisors, as wanted. The converse is trivial. \(\square \)

Lemma 2.5

Suppose that G is not a group of prime order such that \(Z(G)\ne 1\). Then \(\psi (Z(G))<|G|(|Z(G)|-1)\).

Proof

Suppose that \(|G|=n\). If \(G=Z(G)\), then by the main result in [3], we have \(\psi (G)\le \psi (C_n)\). Since n is not prime, \(\psi (C_n)<n(n-1)\).

Now suppose that \(G\ne Z(G)\). Then

$$\begin{aligned} \psi (Z(G))<|Z(G)||Z(G)|\le (|Z(G)|+2)(|Z(G)|-1)\le |G|(|Z(G)|-1), \end{aligned}$$

as wanted. \(\square \)

Now we are ready to state the main result of this section.

Theorem 2.6

Let G be a finite group. Then \(\psi (G)=1+t|G|\) where t is the number of nonidentity conjugacy classes of G if and only if G is either a group of prime order or a nonabelian group of order pq where p and q are distinct primes.

Proof

First, suppose that \(\psi (G)=1+t|G|\) and |G| is not prime and suppose that A is a system of representatives for the set of conjugacy classes of G. Then \(\psi (G)=\sum _{z\in Z(G)}o(z)+|G|\sum _{x\in A-Z(G)}\frac{o(x)}{|C(x)|}\).

If \(Z(G)\ne 1\), then by applying the previous lemma, we conclude that

$$\begin{aligned} \psi (G)=1+t|G|= & {} 1+|G|(|Z(G)|-1)+ |G|(t+1-|Z(G)|)\\> & {} \psi (Z(G))+|G|\sum _{x\in A-Z(G)}\frac{o(x_i)}{|C(x_i)|}=\psi (G), \end{aligned}$$

a contradiction. Therefore \(Z(G)=1\).

If \(o(x)<|C_G(x)|\) for some \(x\in A-Z(G)\), then

$$\begin{aligned} \psi (G)=1+|G|\sum _{x\in A-Z(G)}\frac{o(x)}{|C(x)|}>1+t|G| \end{aligned}$$

which is contrary to the hypothesis. Hence \(C_G(x)=\langle x\rangle \) for every \(x\in A-Z(G)\) and so by Proposition 2.4, the result follows. The converse is clear. \(\square \)

3 The Second Maximum Sum of the Element Orders on Finite Groups of Square-Free Order

It is a natural question to ask which groups have maximum sum of the element orders on noncyclic groups of the same order. This question was answered among all noncyclic nilpotent groups in [4] as follows.

Theorem 3.1

Let \(n=p_1^{\alpha _1}p_2^{\alpha _2}\cdots p_k^{\alpha _k}\) be a positive integer where \(p_1<p_2<\cdots <p_k\) are primes and set \(s=min\{1,\cdots ,k\}\) such that \(\alpha _s>1\). Suppose that G is a noncyclic nilpotent group of order n

  1. (i)

    If \(p_1^{\alpha _1}\ne 8\), then \(\psi (G)\le \psi (C_{\frac{n}{p_s}}\times C_{p_s})\),

  2. (ii)

    If \(p_1^{\alpha _1}=8\), then \(\psi (G)\le \psi \big (Q_8\times C_{\frac{n}{8}}\big )\), where \(Q_8\) is the quaternion group of order 8.

In this section, we characterize groups which have the second maximum sum of the element orders among all groups of the same square-free cardinality.

The following lemmas will be used frequently in the sequel.

Lemma 3.2

( See 5.14 in [7]) Let \(P\in Syl_p(G)\), where G is a finite group and p is the smallest prime divisor of |G|, and assume that P is cyclic. Then G has a normal p-complement.

Lemma 3.3

([1, Corollary B]) Let \(P \in Syl_p(G)\), and assume that \(P \lhd G\) and that P is cyclic. Then \(\psi (G)\le \psi (P) \psi (\frac{G}{P})\), with equality if and only if P is central in G.

Lemma 3.4

([3, Corollary 2.10]) Let \(G=PH\) where P is the unique cyclic Sylow \(p-\)subgroup of G and H is a nilpotent subgroup of G of order \(m=p_1^{\alpha _1}...p_{t-1}^{\alpha _{t-1}}\) such that \(\alpha _i\ge 1\). If \(P_i\in Syl_{p_i}(H)\) for \(i=1,\cdots , t-1\), then \(\psi (G)\le \psi (P_i)\psi (PK)\) where \(K=\Pi _{j\ne i}P_j\).

Lemma 3.5

Let G be a finite group whose order has exactly k prime divisors and also suppose that every Sylow subgroup of G is cyclic. Then G has a normal Sylow p-subgroup where p is the greatest prime divisor of |G|.

Proof

We proceed by induction on k. We may assume that \(k>1\). Let \(P_1\in Syl_{p_1}(G)\), where \(p_1\) is the smallest prime divisor of |G|. By using Lemma 3.2, we have \(G=K\rtimes P_1\). Therefore , by the induction hypothesis, K has a normal Sylow p-subgroup P and so it is a characteristic subgroup of K . Therefore, we have \(P\lhd G\), as wanted.

\(\square \)

Lemma 3.6

Let \(G=\langle x\rangle \rtimes \langle y\rangle \) be a finite group, such that \(gcd(o(x),o(y))=1\). If \(P\in Syl_p(G)\) and \(Q\in Syl_q(G)\) where \(p\ne q\) are primes, then PQ is a subgroup of G. In particular, we have the result for the square-free order groups.

Proof

The proof is clear. \(\square \)

Proposition 3.7

Let \(G=\langle x\rangle \rtimes \langle y\rangle \) be a finite group of order n such that \(gcd(o(x),o(y))=1\). If \(P_i\in Syl_{p_i}(G)\) and \(P_j\in Syl_{p_j}(G)\), where \(p_i\ne p_j\) are prime divisors of |G|, then \(\psi (G)\le \psi (C_{\frac{n}{|P_iP_j|}}\times (P_iP_j)).\)

Proof

We proceed by induction on the number of prime divisors of n. Suppose that \(n=p_1^{\alpha _1}...p_k^{\alpha _k}\) where \(p_1<p_2<\cdots <p_k\) are primes and \(\alpha _i\ge 1 \). Write \(K=\langle x\rangle \) and \(H=\langle y\rangle \). If \(k=2\), then there is nothing to prove. So suppose that \(k>2\). If \(P_iP_j\le K\) or \(P_iP_j\le H\), then repeated use of Lemma 3.3 for all prime divisors of |K| gives \(\psi (G)\le \psi (K)\psi (H)\). Using the induction hypothesis for K or H, the result follows.

Now suppose that \(P_iP_j\nleq K\) and \(P_iP_j\nleq H\). First, suppose that there is \(P_r\in Syl_{p_r}(K)\) so that \(P_r\ne P_i\) and \(P_r\ne P_j\). Therefore, \(P_r\lhd G\) and hence \(P_r\) has a Hall complement in G, say D and Hall complement in K, such as U. By Lemma 3.3, we have \(\psi (G)=\psi (P_r D)\le \psi (P_r)\psi (D)\). Since \(D=UH\), we have by the induction hypothesis that \(\psi (D)\le \psi (C_{\frac{n}{|P_iP_jR|}})\psi (P_iP_j)\). Therefore, the result follows.

Now suppose that \(K=P_j\). Then there is \(P_r\in Syl_{p_r}(H)\) such that \(P_r\ne P_j\). Since H is cyclic, we have \(P_r\) has Hall complement in H, say D. By Lemma 3.4, we conclude that \(\psi (G)\le \psi (P_r)\psi (\textit{KD})\). Therefore, \(\psi (\textit{KD})\le \psi (C_{\frac{n}{|P_iP_jP_r|}})\psi (P_iP_j)\) by the induction hypothesis and the proof is complete. \(\square \)

Remark 3.8

We retain the notations used in Theorem 1.3. If there exists \(i\in \Omega \) such that \((i, j)\notin B_n\) for each \(j\in \Omega \), then the Sylow \(p_i\)-subgroup of every group of order n is central. Therefore by Lemma 3.3, finding the structure of groups which have the second maximum of \(\psi \) among all groups of order n is restricted to finding the structure of groups which have the second maximum of \(\psi \) among all groups of order \(\frac{n}{p_i}\). Thus without loss of generality, we may assume that \(r=1\) and so in the sequel we always have \(p_1\mid p_i-1\) for some \(i \in \Omega \).

First, we state two special cases of Theorem 1.3 for \(k\in \{3, 4\}\), where k is the number of prime divisors of n.

Lemma 3.9

Let \(n=p_1p_2p_3\) be a positive integer such that \(p_1<p_2<p_3\) are primes and \(p_1|p_2-1\). If G is a noncyclic group of order n, then \(\psi (G)\le \psi (C_{p_3}\times (C_{p_2}\rtimes C_{p_{1}}))\).

Proof

Suppose that \(P_i\in Syl_{p_i}(G)\) for each i. By Lemma 2.2, we have \(G=F(G)\rtimes H\), where H and F(G) are cyclic. If \(p_3\mid |Z(G)|\), then \(G\cong C_{p_3}\times (C_{p_2}\rtimes C_{p_{1}})\) and we have the result. So suppose that \(p_3\not \mid |Z(G)|\). Then by Proposition 3.7, we have \(\psi (G)\le \psi (P_j) \psi (P_3\rtimes P_i)\), where \(\{i,j\}=\{1,2\}\) and \(Z(P_3\rtimes P_i)=1\). So it is enough to prove that

$$\begin{aligned} \psi (C_{p_3})\psi (C_{p_2}\rtimes C_{p_{1}})\ge \psi (C_{p_j}) \psi (C_{p_3}\rtimes C_{p_i}). \end{aligned}$$

This is equivalent to

$$\begin{aligned} \psi (C_{p_3})[\psi (C_{p_2})+p_2(\psi (C_{p_1})-1)-\psi (P_j)]\ge p_3\psi (C_{p_j})(\psi (C_{p_i})-1). \end{aligned}$$

First, suppose that \(j=2\). Then \(\psi (C_{p_2})+p_2(\psi (C_{p_1})-1)-\psi (P_j)= p_2(\psi (C_{p_1})-1)\) and \(\psi (C_{p_2})(\psi (C_{p_1})-1) = \psi (C_{p_j})(\psi (C_{p_i})-1)\). It thus suffices to show that \(\psi (C_{p_3})p_2(\psi (C_{p_1})-1)\ge p_3\psi (C_{p_2})(\psi (C_{p_1})-1).\) This is equivalent to \(\psi (C_{p_3})p_2\ge p_3\psi (C_{p_2})\). But \((p_3^2-p_3+1)p_2 > p_3(p_2^2-p_2+1)\) is always true.

Now suppose that \(j=1\). Since

$$\begin{aligned} \psi (C_{p_2})+p_2(\psi (C_{p_1})-1)-\psi (P_j)=\psi (C_{p_2})+ p_2(\psi (C_{p_1})-1)-\psi (C_{p_1}) \end{aligned}$$

and \(\psi (C_{p_1})(\psi (C_{p_2})-1) = \psi (C_{p_j})(\psi (C_{p_i})-1),\) it suffices to show that

$$\begin{aligned} \psi (C_{p_3})[\psi (C_{p_2})+ p_2(\psi (C_{p_1})-1)-\psi (C_{p_1})]\ge p_3\psi (C_{p_1})(\psi (C_{p_2})-1). \end{aligned}$$

This is equivalent to \(\psi (C_{p_3})(\psi (C_{p_2})-\psi (C_{p_1}))+\psi (C_{p_3}) p_2(\psi (C_{p_1})-1)\ge p_3\psi (C_{p_1})(\psi (C_{p_2})-1).\)

Since \(p_2^2-p_2-p_1^2+p_1>p_2\), we have

$$\begin{aligned} (p_3^2-p_3+1)(p_2^2-p_2-p_1^2+p_1)>(p_3^2-p_3+1)p_2. \end{aligned}$$

Since \(p_3^2-p_3+1>p_3(p_3-1)\), it follows that

$$\begin{aligned} (p_3^2-p_3+1)(p_2^2-p_2-p_1^2+p_1)>p_3(p_3-1)p_2>p_3(p_2^2-p_2). \end{aligned}$$

Thus

$$\begin{aligned} \psi (C_{p_3})(\psi (C_{p_2})-\psi (C_{p_1}))>p_3(\psi (C_{p_2})-1). \end{aligned}$$

Also we have

$$\begin{aligned} \psi (C_{p_3}) p_2(\psi (C_{p_1})-1)> & {} (p_3^2-p_3)p_2 (p_1^2-p_1)\\> & {} p_3(p_2^2-p_2)(p_1^2-p_1)\\= & {} p_3(\psi (C_{p_2})-1)(\psi (C_{p_1})-1). \end{aligned}$$

Since

$$\begin{aligned} p_3\psi (C_{p_1})\psi (C_{p_2}-1)=p_3(\psi (C_{p_1})-1)(\psi (C_{p_2})-1)+p_3(\psi (C_{p_2})-1), \end{aligned}$$

we have result. \(\square \)

Lemma 3.10

Let \(n=p_1p_2p_3\) be a positive integer such that \(p_1<p_2<p_3\) are primes, \(p_1\not \mid p_2-1\) and \(p_1|p_3-1\). If G is a noncyclic group of order n, then \(\psi (G)\le \psi (C_{p_2}\times (C_{p_3}\rtimes C_{p_{1}}))\).

Proof

The proof is similar to the previous lemma. \(\square \)

Corollary 3.11

Let \(n=p_1p_2p_3\) be a positive integer such that \(p_1<p_2<p_3\) are primes and suppose that \(p_i\) is the smallest prime divisor of n such that \(p_1|p_i-1\). If G is a noncyclic group of order n, then \(\psi (G)\le \psi (C_{p_j}\times (C_{p_i}\rtimes C_{p_{1}}))\), where \(p_ip_j=p_2p_3\).

Proof

It follows from Lemmas 3.9 and 3.10. \(\square \)

The following result is useful to prove Lemma 3.13.

Lemma 3.12

Let \(1<n_1<n_2<n_3<n_4\) be integers. Then

$$\begin{aligned}&(n_4\!-\!1)[(n_3^2-n_3\!+\!1)(n_2^2-n_2\!+\!1+n_2(n_1^2-n_1))-(n_1^2-n_1+1)(n_2^2-n_2+1)]\\&\quad >(n_2^2-n_2+1)(n_1^2-n_1+1)(n_3^2-n_3). \end{aligned}$$

Proof

We proceed by induction on \(n_4\). First, suppose that \(n_4=5\), so \(n_3=4\), \(n_2=3\), and \(n_1=2\). Then we have \(592>252\) as wanted. Assume that \(n_4>5\). If there is an integer m such that \(n_4>m>n_3\), then we have result by induction. So suppose that \(n_3=n_4-1\). Then it is enough to prove that

$$\begin{aligned}&[(n_3^2-n_3+1)(n_2^2-n_2+1+n_2(n_1^2-n_1))-(n_1^2-n_1+1)(n_2^2-n_2+1)]\\&\quad >(n_2^2-n_2+1)(n_1^2-n_1+1)(n_3-1). \end{aligned}$$

But we have

$$\begin{aligned}&(n_3^2-n_3+1)(n_2^2-n_2+1+n_2(n_1^2-n_1))-(n_1^2-n_1+1)(n_2^2-n_2+1)\\&\quad >(n_3^2-n_3+1)(n_2^2-n_2+1+n_2(n_1^2-n_1))-(n_1^2-n_1+1)(n_3^2-n_3+1)\\&\quad =(n_3^2-n_3+1)(n_2^2-n_2+(n_2-1)(n_1^2-n_1)). \end{aligned}$$

So it is enough to prove that

$$\begin{aligned} (n_3^2-n_3+1)(n_2^2-n_2\!+\!(n_2-1)(n_1^2-n_1))\!>\!(n_2^2-n_2+1)(n_1^2-n_1+1)(n_3-1). \end{aligned}$$

Since \(n_3^2-n_3+1>n_3(n_3-1)\), it suffices to show that

$$\begin{aligned} n_3(n_2^2-n_2+(n_2-1)(n_1^2-n_1))>(n_2^2-n_2+1)(n_1^2-n_1+1). \end{aligned}$$

Since \(n_3(n_2^2-n_2)>n_2^2-n_2+1\), it is enough to prove that

$$\begin{aligned} n_3(n_2-1)(n_1^2-n_1)>(n_2^2-n_2+1)(n_1^2-n_1). \end{aligned}$$

Since \(n_3\ge n_2+1\), we have \(n_3(n_2-1)\ge (n_2+1)(n_2-1)>(n_2^2-n_2+1)\) which is always true. \(\square \)

Lemma 3.13

Let \(n=p_1p_2p_3p_4\) be a positive integer such that \(p_1<p_2<p_3<p_4\) are primes and \(p_1\mid p_2-1\). If G is a noncyclic group of order n, then \(\psi (G)\le \psi (C_{p_3p_4}\times (C_{p_2}\rtimes C_{p_{1}}))\).

Proof

By Lemma 2.2, we have \(G=F(G)\rtimes H\), where H and F(G) are cyclic. Assume that \(P_i\in Syl_{p_i}(G)\) for each \(1\le i\le 4\). If \(P_1P_2\) is not a cyclic subgroup of G, then by Proposition 3.7, we conclude that \(\psi (G)\le \psi (C_{p_4p_3})\psi (P_2P_1)=\psi (C_{p_4p_3}\times (C_{p_2}\rtimes C_{p_1}))\). So suppose that \(P_1P_2\) is a cyclic subgroup of G. By Lemma 3.2, we have \(G=K\rtimes P_1\), where \(K=P_4P_3P_2\). If \(P_1P_2\le Z(G)\), then \(\psi (G)=\psi (P_1P_2)\psi (H)\) and so it suffices to show that

$$\begin{aligned} \psi (C_{p_4p_3})\psi (C_{p_2}\rtimes C_{p_{1}}))\ge \psi (P_2\times P_1) \psi (P_4\rtimes P_3). \end{aligned}$$
(3.1)

But we have \(\psi (C_{p_2}\rtimes C_{p_{1}}))=\psi (C_{p_2})+p_2(\psi (C_{p_1})-1)\) and \(\psi (P_4\rtimes P_3)=\psi (C_{p_4})+p_4(\psi (C_{p_3})-1)\), and it follows that the inequality (3.1) is equivalent to

$$\begin{aligned}&\psi (C_{p_4})[\psi (C_{p_2p_3})+p_2\psi (C_{p_3})(\psi (C_{p_1})-1)-\psi (C_{p_2p_1})]\\&\quad >p_4\psi (C_{p_1p_2})(\psi (C_{p_3})-1)). \end{aligned}$$

Therefore, it is enough to prove that

$$\begin{aligned}&(p_4^2-p_4+1)[(p_3^2-p_3+1)(p_2^2-p_2+1+p_2(p_1^2-p_1))\\&\quad -(p_1^2-p_1+1)(p_2^2-p_2+1)]\\&\quad >p_4(p_2^2-p_2+1)(p_1^2-p_1+1)(p_3^2-p_3). \end{aligned}$$

Since \(p_4^2-p_4+1>p_4(p_4-1)\), it suffices to show that

$$\begin{aligned}&(p_4\!-\!1)[(p_3^2-p_3\!+\!1)(p_2^2-p_2\!+\!1\!+\!p_2(p_1^2-p_1))\!-\!(p_1^2-p_1+1)(p_2^2-p_2\!+\!1)]\\&\quad >(p_2^2-p_2+1)(p_1^2-p_1+1)(p_3^2-p_3). \end{aligned}$$

This is true by the previous lemma.

Now suppose that \(P_1P_2\nleq Z(G)\). Then \(P_1\nleq Z(G)\) or \(P_{2}\nleq Z(G)\). First, suppose that \(P_i\nleq C_G(P_1)\) for some i. Then by Lemma 2.2, \(G=F(G)\rtimes H\), where H and F(G) are cyclic. So by Proposition 3.7, we see that \(\psi (G)\le \psi (C_{p_rp_s})\psi (P_iP_1)\) such that \(r,s\in \{1,2,3,4\}-\{1,i\}\). If \(r=2\), then \(\psi (G)\le \psi (C_{p_2p_s})\psi (P_iP_1)=\psi (C_{p_2})\psi (C_{p_s})\psi (P_iP_1)\). It follows from Lemma 3.9 that \( \psi (C_{p_2})\psi (P_iP_1)\le \psi (C_{p_i})\psi (C_{p_2}\rtimes C_{p_1})\). Multiplying both sides of the inequality by \(\psi (C_{p_{s}})\), we have the result. So we can suppose that \(r\ne 2\). It is clear that \(\psi (C_{p_3p_4}\times (C_{p_2}\rtimes C_{p_{1}}))=\psi (C_{p_r})\psi (\frac{C_{p_3p_4}\times (C_{p_2}\rtimes C_{p_{1}})}{C_{p_r}})\). So it is enough to prove that \(\psi (P_s)\psi (P_iP_1)\le \psi (\frac{C_{p_3p_4}\times (C_{p_2}\rtimes C_{p_{1}})}{C_{p_r}})\). This holds by Lemma 3.9. The result follows by a similar argument when \(P_i\nleq C_G(P_2)\). \(\square \)

Lemma 3.14

Let \(n=p_1p_2p_3p_4\) be a positive integer such that \(p_1<p_2<p_3<p_4\) are primes and suppose that \(p_i\) is the smallest prime divisor of n such that \(p_1|p_i-1\). If G is a noncyclic group of order n, then \(\psi (G)\le \psi (C_{\frac{n}{p_1p_i}}\times (C_{p_i}\rtimes C_{p_{1}}))\).

Proof

If \(i=2\), then the result follows from previous lemma. So we can suppose that \(i>2\). Then \(P_2\le C_{G}(P_1)\) and so we conclude that \(P_j\nleq C_G(P_1)\) for some \(j\in \{3,4\}\). Now assume that \(t\in \{1,2,3,4\}-\{1,i,j\}\). We have \(G=F(G)\rtimes H\). If \(P_t\le F(G)\), then by Lemma 3.3, we see that \(\psi (G)\le \psi (P_t)\psi (P_jP_iP_1)\). If \(P_t\le H\), then by Lemma 3.4, we have \(\psi (G)\le \psi (P_t)\psi (P_jP_iP_1)\). It follows from Corollary 3.11 that \(\psi (P_jP_iP_1)\le \psi (C_{p_j}\times (C_{p_i}\rtimes C_{P_1}))\). Multiplying both sides of the inequality by \(\psi (C_{p_{t}})\), the result follows. \(\square \)

Now we are ready to prove Theorem 1.3.

Theorem 3.15

Let \(n=p_1p_2...p_k\) be a positive integer where \(p_1<...<p_k\) are primes. If \(B_n\) is nonempty and (rs) is the minimum element of \(B_n\) under \(\preceq \), then the noncyclic group \(T=C_{\frac{n}{p_rp_s}}\times (C_{p_s}\rtimes C_{p_r})\) has the second maximum of \(\psi \) among all groups of order n. More precisely if G is a noncyclic group of order n, then \(\psi (G)\le \psi (C_{\frac{n}{p_rp_s}}\times (C_{p_s}\rtimes C_{p_r})).\)

Proof

First, we may assume that \(r=1\) by Remark 3.8. The proof is done by induction on k. The result follows for \(k\le 4\) by Corollary 3.11 and Lemma 3.14. Suppose that \(k>4\). Then by Lemma 2.2, we have \(G=F(G)\rtimes H\), where H and F(G) are cyclic. By Proposition 3.7, we see that \(\psi (G)\le \psi (C_{\frac{n}{p_ip_d}})\psi (P_dP_i))\) for some primes \(p_i\ne p_d\) where \(P_d\) and \(P_i\) are Sylow subgroups such that \(P_dP_i\) is not abelian. So it is enough to prove that

$$\begin{aligned} \psi ( C_{\frac{n}{p_ip_d}})\psi (P_dP_i))\le \psi ( C_{\frac{n}{p_1p_s}})\psi (C_{p_s}\rtimes C_{p_1}). \end{aligned}$$
(3.2)

If \(|\{1,s\}\cap \{i,d\}|=1\), then by applying Lemma 2.1, we can reduce (3.2) to the case \(k\le 3\) and we have the result by Lemma 3.9.

If \(\{s,1\}\cap \{i,d\}=\varnothing \), then by using Lemma 2.1, it is enough to prove that \(\psi ( C_{p_sp_1})\psi (P_dP_i))\le \psi ( C_{p_dp_i})\psi (C_{p_s}\rtimes C_{p_1})\). This holds by the previous lemma. \(\square \)

Finally we notice that the last assertion of Theorem 1.3 follows from the proof of Theorem 3.15. Thus there is a unique group with the second maximum sum of the element orders among all groups of the same square-free cardinality.