1 Introduction

Let A and B be two rings or algebras.

A map \(f:A\rightarrow B\) is called additive if \(f(a+b)=f(a)+f(b)\) for all \(a,b\in A\). An additive map f is called a homomorphism or an anti-homomorphism if \(f(ab)=f(a)f(b)\) or \(f(ab)=f(b)f(a)\), for all \(a,b\in A\), respectively, and it is called an n-homomorphism or anti n-homomorphism if \(f(a_1a_2\cdots a_n)=f(a_1)f(a_2)\cdots f(a_n)\) or \(f(a_1a_2\cdots a_n)=f(a_n)f(a_{n-1})\cdots f(a_2)f(a_1)\), respectively, for all \(a_1,a_2,\ldots ,a_n\in A\). In particular, if \(f(a^n)=f(a)^n\) for every \(a\in A\), then f is called an n-Jordan homomorphism. In this paper we always assume that \(n\ge 2\). A 2-Jordan homomorphism is simply called a Jordan homomorphism.

Whenever A and B are algebras, some authors define the above notions for a linear map \(f:A\rightarrow B\) rather than an additive map. But in our terminology, f is assumed to be additive, not necessarily linear, even if A is an algebra.

The study of Jordan homomorphisms was initiated by some authors, including Kaplansky [13], Jacobson and Rickart [12], and Herstein [10]. Many authors have been working on the properties of Jordan homomorphisms since 1947. Note that every Jordan homomorphism between two algebras is an n-Jordan homomorphism for all \(n\ge 2\) [15, Lemma 6.3.2], but the converse is not true, in general.

The notion of n-Jordan homomorphism between rings was introduced in 1956 by Herstein [10] and the concept of n-homomorphism between algebras was introduced in 2005 by Hejazian et al. [9] and have been studied by many authors since then. A ring A is called a prime ring if for any \(a,b\in A\), \(aAb=\{0\}\) implies that \(a=0\) or \(b=0\). We say that a ring A is of characteristic not n (char(A)\(\ne n\)), respectively, larger than n (char(A)\(> n\)), if \(na=0\), respectively, \(n!a=0\), implies that \(a=0\) for all \(a\in A\).

A classical result due to Herstein [10, Theorem H] shows that every Jordan homomorphism from a ring onto a prime ring of characteristic different from 2 and 3 is either a homomorphism or an anti-homomorphism.

The following interesting result, concerning Jordan homomorphisms on algebras, is due to Żelazko, which can be deduced from [16, Theorem 1].

Theorem 1.1

Let A be an algebra, which is not-necessarily commutative, and let B be a semisimple commutative Banach algebra. Then every linear Jordan homomorphism \(f:A\rightarrow B\) is a homomorphism.

Note that the original result of Żelazko in [16, Theorem 1] has been stated for a linear Jordan functional on an algebra, but it is still valid on rings, even if the functional is an additive Jordan mapping. We now present a proof for this extension.

Theorem 1.2

Every additive Jordan functional on a ring is multiplicative.

Proof

Let f be an additive Jordan functional on a ring A and ab be arbitrary elements of A. Since f is a Jordan mapping, \(f(ab+ba)=2f(a)f(b).\) Moreover, \(f(a(ab+ba)+(ab+ba)a)=4f(a)^2f(b)\). It follows that \(f(a)^2f(b)=f(aba)\) and hence \(f(a)^2f(b^2)=f(ab^2a)\). Similarly, we have \(f(b)^2f(a^2)=f(ba^2b)\). On the other hand,

$$\begin{aligned} f((ab+ba)^2)=f(ab)^2+f(ba)^2+2f(ab)f(ba). \end{aligned}$$

Hence \(f(a)^2f(b^2)=f(ab)f(ba)\). By the above relations we obtain the following equalities: \(f(ab)+f(ba)=2f(a)f(b)\) and \(f(ab)f(ba)=f(a)^2f(b)^2\). Therefore, \(f(ab)=f(ba)=f(a)f(b)\) and hence f is multiplicative. \(\square \)

By the result above, we can also extend Theorem 1.1 as follows:

Theorem 1.3

Let A be a ring, which is not necessarily commutative, and let B be a semisimple commutative Banach algebra. Then, every additive Jordan homomorphism \(f:A\rightarrow B\) is an additive homomorphism.

In 2007, Bračič and Moslehian obtained interesting results for 3-homomorphisms between C*-algebras, in [5].

In 2009, Gordji in [6] proved that for \(n\in \{3,4\}\), every n-Jordan homomorphism between two commutative algebras is an n-homomorphism. In 2012, this result was extended for \(n<8\) by Bodaghi and Shojaee [3].

In 2013, Lee extended the previous result for every n when A and B are commutative algebras [14].

In 2014, Gselmann also proved the above general result for commutative rings in [8] as follows:

Theorem 1.4

Every n-Jordan homomorphism \(\varphi \) between commutative rings A and B is an n-homomorphism if \(char(B)>n\). Moreover, if A is unital with the unit \(e_A\), then the map \(\psi \) defined by \(\psi (x)=\varphi (e_A)^{n-2}\varphi (x)\) is a homomorphism.

In 2016 and 2018, Zivari-Kazempour proved that every 3-Jordan or 5-Jordan homomorphism from a unital Banach algebra into a semisimple commutative Banach algebra is a 3-homomorphism or 5-homomorphism [17] and [18]. Note that in these articles 3-Jordan or 5-Jordan homomorphisms are assumed to be linear.

Later in 2017, An proved the following result in [2], even if A and B are not commutative. But he imposed one more condition as follows:

Theorem 1.5

Let A and B be two rings, where A is unital and \(char(B)>n\). If every Jordan homomorphism from A into B is a homomorphism (an anti-homomorphism), then every n-Jordan homomorphism from A into B is an n-homomorphism (an anti n-homomorphism).

It was also shown by Bodaghi and Inceboz in 2018 that every additive (not necessarily linear) n-Jordan homomorphism between two commutative algebras is an n-homomorphism [4]. However, their proof is different from that of Lee and Gselmann. Since B is an algebra, it is clear that \(char(B)>n\) and so Theorem 1.4 is stronger than the result of Lee, Bodaghi and Inceboz.

We either extend the known results in this area, or obtain similar results with different approach, while presenting shorter proofs for the recent known results.

2 n-Jordan Homomorphisms and n-Homomorphisms Between Rings and Algebras

We now extend the above-mentioned results, for n-Jordan homomorphisms, when A and B are rings or algebras and have weaker conditions than the above results.

We first present the following theorem, which plays an essential role for the next results. The set of all bijections \(\sigma :\{1,2,\ldots ,n\}\rightarrow \{1,2,\ldots ,n\}\) is denoted by \(S_n\).

Theorem 2.1

Let A be a ring and \(a_1,a_2,\ldots ,a_n\in A\) (\(n\ge 2\)). Then

$$\begin{aligned} \sum _{k=0}^{n-1} (-1)^k\sum _{I,|I|=n-k}\left( \sum _{i\in I} a_i\right) ^n=\sum _{\sigma \in S_n} a_{\sigma (1)} a_{\sigma (2)}\cdots a_{\sigma (n)}, \end{aligned}$$

where I is a subset of \(\{1,2,\ldots ,n\}\), |I| indicates the number of elements of I, and \(\sigma \) runs through all permutations of the elements \(a_1,a_2,\ldots ,a_n\in A\).

Proof

Let \(S=S(a_1,a_2,\ldots ,a_n)=\sum _{k=0}^{n-1}(-1)^k\sum _{I,|I|=n-k}\left( \sum _{i\in I}a_i\right) ^n\). Then, S can be represented in the form

$$\begin{aligned} S= & {} \left( \sum _{i=1}^n a_i\right) ^n-\sum _{I,|I|=n-1}\left( \sum _{i\in I}a_i\right) ^n+\cdots +(-1)^{n-1}\sum _{I,|I|=1}\left( \sum _{i\in I}a_i\right) ^n \\= & {} \left( \sum _{i=1}^n a_i\right) ^n-\sum _{i=1}^n \left( a_0+a_1+\cdots +a_{i-1}+a_{i+1}+\cdots +a_n+a_{n+1}\right) ^n \\&+\cdots + (-1)^{n-1}(a_1^n+a_2^n+\cdots +a_n^n), \end{aligned}$$

where \(a_0=a_{n+1}=0\). Note that the expression

$$\begin{aligned} \sum _{\sigma \in S_n}a_{\sigma (1)}a_{\sigma (2)}\cdots a_{\sigma (n)}, \end{aligned}$$

appears only in the term \(\left( \sum _{i=1}^n a_i\right) ^n\).

We first show that if \(a_j=0\) for some j then \(S=0\). For the proof, we split the sigma \((-1)^k\sum _{I,|I|=n-k}\left( \sum _{i\in I} a_i\right) ^n\) into two parts, in the form

$$\begin{aligned} (-1)^k\sum _{I,|I|=n-k, j\in I}\left( \sum _{i\in I} a_i\right) ^n+(-1)^k\sum _{I,|I|=n-k, j\notin I}\left( \sum _{i\in I} a_i\right) ^n. \end{aligned}$$

Since \(a_j=0\), the first sigma can be written as

$$\begin{aligned} (-1)^k\sum _{I,|I|=n-k-1, j\notin I}\left( \sum _{i\in I} a_i\right) ^n. \end{aligned}$$

Similarly, the sigma \((-1)^{k-1}\sum _{I,|I|=n-(k-1)}\left( \sum _{i\in I} a_i\right) ^n\) splits into two parts:

$$\begin{aligned} (-1)^{k-1}\sum _{I,|I|=n-(k-1), j\in I}\left( \sum _{i\in I} a_i\right) ^n+(-1)^{k-1}\sum _{I,|I|=n-(k-1), j\notin I}\left( \sum _{i\in I} a_i\right) ^n. \end{aligned}$$

Since \(a_j=0\), the first sigma is, in fact, equal to

$$\begin{aligned} (-1)^{k-1}\sum _{I,|I|=n-k, j\notin I}\left( \sum _{i\in I} a_i\right) ^n, \end{aligned}$$

which cancels out with the term \((-1)^k\sum _{I,|I|=n-k, j\notin I}\left( \sum _{i\in I}a_i\right) ^n.\)

With the argument above, all terms in S cancels out when \(a_j=0\), and hence \(S=0\). Since \(\sum _{\sigma \in S_n} a_{\sigma (1)}a_{\sigma (2)}\cdots a_{\sigma (n)}=0\) in this case, we have

$$\begin{aligned} S=\sum _{\sigma \in S_n} a_{\sigma (1)}a_{\sigma (2)}\cdots a_{\sigma (n)}, \end{aligned}$$
(2.1)

whenever \(a_j=0\) for some j.

We now show that (1) is also valid even if all elements \(a_1,a_2,\ldots ,a_n\in A\) are non-zero. For \(x\in A\), let

$$\begin{aligned} P(x)=\sum _{k=0}^{n-1} (-1)^k\sum _{I,|I|=n-k}\left( \sum _{i\in I} (a_i-x)\right) ^n \end{aligned}$$

and

$$\begin{aligned} Q(x)=\sum _{\sigma \in S_n} (a_{\sigma (1)}-x)(a_{\sigma (2)}-x)\cdots (a_{\sigma (n)}-x). \end{aligned}$$

Clearly, P(x) and Q(x) are polynomials of x with degree n and their coefficients are integers. Moreover, by the previous discussion, the elements \(a_1,a_2,\ldots ,a_n\) are the roots of these polynomials. Hence, they can be represented in the following forms:

$$\begin{aligned} P(x)=\lambda _nx^n+\lambda _{n-1}x^{n-1}+ \cdots + \lambda _1x+\lambda _0=\lambda _n(x-a_1)(x-a_2) \cdots (x-a_n), \\ Q(x)=\mu _nx^n+\mu _{n-1}x^{n-1}+ \cdots +\mu _1x+\mu _0=\mu _n(x-a_1)(x-a_2) \cdots (x-a_n). \end{aligned}$$

We now show that \(\lambda _n=\mu _n\). It is clear that \(\mu _n=(-1)^n n!\). On the other hand, we have

$$\begin{aligned} \lambda _n=(-1)^n\sum _{k=0}^{n-1} (-1)^k \left( {\begin{array}{c}n\\ n-k\end{array}}\right) (n-k)^n. \end{aligned}$$

Now let \(S_{n}^{(m)}\) be the number of ways of partitioning a set of n elements into m non-empty subsets. By [1, Page 824, 24.1.4], we have

$$\begin{aligned} m! S_{n}^{(m)}=\sum _{k=0}^{m} (-1)^{m-k} \left( {\begin{array}{c}m\\ k\end{array}}\right) k^n. \end{aligned}$$

Since \(S_{n}^{(n)}=1\), we conclude that

$$\begin{aligned} \sum _{k=0}^{n-1} (-1)^k \left( {\begin{array}{c}n\\ n-k\end{array}}\right) (n-k)^n=n!. \end{aligned}$$

Therefore, \(\lambda _n=\mu _n\) and hence \(P(x)=Q(x)\) for all \(x\in A\). In particular, \(P(0)=Q(0)\), which shows that formula (1) holds for arbitrary elements \(a_1,a_2,\ldots ,a_n\). This completes the proof of the theorem. \(\square \)

By applying the theorem above, we obtain the following interesting result, which has also been mentioned in [10].

Theorem 2.2

Let A and B be two rings and \(f:A\rightarrow B\) be an n-Jordan homomorphism. Then,

$$\begin{aligned} f\left( \sum _{\sigma \in S_n}a_{\sigma (1)}a_{\sigma (2)}\cdots a_{\sigma (n)}\right) =\sum _{\sigma \in S_n} f(a_{\sigma (1)})f(a_{\sigma (2)})\cdots f(a_{\sigma (n)}). \end{aligned}$$

Proof

By Theorem 2.1 we have

$$\begin{aligned}&f\left( \sum _{\sigma \in S_n} a_{\sigma (1)}a_{\sigma (2)}\cdots a_{\sigma (n)}\right) \\&\quad =f\left( \sum _{k=0}^{n-1}(-1)^k\sum _{I,|I|=n-k}\left( \sum _{i\in I}a_i\right) ^n\right) \\&\quad =\sum _{k=0}^{n-1}(-1)^k\sum _{I,|I|=n-k}f\left( \sum _{i\in I} a_i\right) ^n=\sum _{k=0}^{n-1}(-1)^k\sum _{I,|I|=n-k}\left( \sum _{i\in I}f(a_i)\right) ^n\\&\quad =\sum _{\sigma \in S_n}f(a_{\sigma (1)})f(a_{\sigma (2)})\cdots f(a_{\sigma (n)}). \end{aligned}$$

\(\square \)

As we have indicated before, the next result has already been obtained by Gselmann in [8], but by applying the theorem above, we present a proof which is much shorter than her long proof.

Theorem 2.3

Let \(f:A\rightarrow B\) be an n-Jordan homomorphism between two commutative rings A and B with \(char(B)>n\). Then f is an n-homomorphism.

Proof

Since A and B are commutative, by Theorem 2.2 we have

$$\begin{aligned} f(n! a_1a_2\cdots a_n)=n!f(a_1)f(a_2)\cdots f(a_n), \end{aligned}$$

for all \(a_1,a_2,\ldots ,a_n\in A.\) Since \(char(B)>n\), we obtain

$$\begin{aligned} f(a_1a_2\cdots a_n)=f(a_1)f(a_2)\cdots f(a_n), \end{aligned}$$

that is, f is an n-homomorphism. \(\square \)

By applying Theorem 2.2, we can prove many results on the connection between n-Jordan homomorphisms and n-homomorphisms on rings and algebras. We may either provide a shorter proof for the known results or extend the previous results to more general cases.

We first present a useful lemma, which can be deduced from Theorem 2.2.

Lemma 2.4

Let \(f:A\rightarrow B\) be an n-Jordan homomorphism between rings A and B such that \( char(B)> n-1\). Then for every \(x,y\in A\) we have

$$\begin{aligned}&f(xy^{n-1}+yxy^{n-2}+\cdots +y^{n-1}x)\\&\quad =f(x)f(y)^{n-1}+f(y)f(x)f(y)^{n-2}+\cdots +f(y)^{n-1}f(x). \end{aligned}$$

In particular, when B is commutative and \(char(B)>n\), f is a \((2n-1)\)-Jordan homomorphism.

Proof

Let \(x,y\in A\) and take \(a_1=x\) and \(a_2=a_3=\cdots =a_n=y\). Then,

$$\begin{aligned}&\sum _{\sigma \in S_n} a_{\sigma (1)}a_{\sigma (2)}\cdots a_{\sigma (n)} \\&\quad = (n-1)!\left( xy^{n-1}+yxy^{n-2}+y^2xy^{n-3}+\cdots +y^{n-1}x\right) , \end{aligned}$$

and similarly

$$\begin{aligned}&\sum _{\sigma \in S_n} f(a_{\sigma (1)})f(a_{\sigma (2)})\cdots f(a_{\sigma (n)}) \\&\quad = (n-1)!(f(x)f(y)^{n-1}+f(y)f(x)f(y)^{n-2}+\cdots +f(y)^{n-1}f(x)). \end{aligned}$$

Since \(char(B)>n-1\), using Theorem 2.2 we have

$$\begin{aligned}&f(xy^{n-1}+yxy^{n-2}+\cdots +y^{n-1}x) \\&\quad = f(x)f(y)^{n-1}+f(y)f(x)f(y)^{n-2}+\cdots +f(y)^{n-1}f(x). \end{aligned}$$

If B is commutative, by taking \(x=a^n\) and \(y=a\), for an arbitrary \(a\in A\), we have \(f(na^{2n-1})=nf(a^n)f(a)^{n-1}.\)

Since \(char(B)>n\), we conclude that \(f(a^{2n-1})=f(a)^{2n-1}\). \(\square \)

An algebra A is called integral domain if it is commutative and whenever \(ab=0\) for \(a,b\in A\), it follows that either \(a=0\) or \(b=0\).

Theorem 2.5

Let A be a ring and B be an integral domain. If \(f: A\rightarrow B\) is an n-Jordan homomorphism, then \(f(a^2)^{n-1}=f(a)^{2n-2}\) for all \(a\in A\). In particular, if \(B={\mathbb {C}}\) then for each \(a\in A\) there exists \(\gamma _a\in {\mathbb {C}}\) such that \(\gamma _a^{n-1}=1\) and \(f(a^2)=\gamma _a f(a)^2\).

Proof

For \(a\in A\), take \(x=a\) and \(y=a^2\) in Lemma 2.4. Then \(f(a^{2n-1})=f(a)f(a^2)^{n-1}\). Again if we take \(x=a^{n+1}\) and \(y=a\), we have

$$\begin{aligned} f(a^2)^n=f(a^{2n})=f(a^{n+1})f(a)^{n-1}. \end{aligned}$$

If \(f(a)=0\) then \(f(a^2)^n=0\) and so \(f(a^2)=0\), since B is an integral domain. Therefore, the conclusion of the theorem is satisfied in this case. On the other hand, by Lemma 2.4, it follows that

$$\begin{aligned} f(a)^{2n-1}=f(a^{2n-1})=f(a)f(a^2)^{n-1} \end{aligned}$$

and hence \(f(a)(f(a^2)^{n-1}-f(a)^{2n-2})=0\). Since B is an integral domain, \(f(a^2)^{n-1}=f(a)^{2n-2}\), whenever \(f(a)\ne 0\) and hence the conclusion of the theorem is satisfied in this case too.

Finally, Let \(B={\mathbb {C}}\) and take the \((n-1)^{st}\) root of both sides of \(f(a^2)^{n-1}=f(a)^{2n-2}\) to obtain

$$\begin{aligned} f(a^2)=\gamma _a f(a)^2, \end{aligned}$$

where \(\gamma _a\) is a complex number such that \(\gamma _a^{n-1}=1\). This completes the proof of the theorem. \(\square \)

In the following result, we show that \(\gamma _a\) in the theorem above is, in fact, independent of a.

Theorem 2.6

Let A be a ring and \(f:A\rightarrow {\mathbb {C}}\) be an n-Jordan homomorphism. Then, there exists a fixed \(\gamma \in {\mathbb {C}}\), independent of x, such that \(\gamma ^{n-1}=1\) and \(f(x^2)=\gamma f(x)^2\) for all \(x\in A\).

Proof

By Theroem 2.5, for each \(x\in A\) there exists \(\gamma _x\in {\mathbb {C}}\) such that \(\gamma _x^{n-1}=1\) and

$$\begin{aligned} f(x^2)=\gamma _x f(x)^2. \end{aligned}$$

In particular, \(f(x^2)=0\) for all \(x\in A\) with \(f(x)=0\). That is, the equality \( f(x^2)=\gamma f(x)^2\) holds for all \(\gamma \in {\mathbb {C}}\) and every \(x\in A\) with \(f(x)=0\). Hence to complete the proof, we have to show that \(\gamma _x=\gamma _y\) for every \(x,y\in A\) with \(f(x)\ne 0\) and \(f(y)\ne 0\).

Let \(f(x)\ne 0\) and \(f(y)\ne 0\). Then, for each \(k\in {\mathbb {N}}\), we have

$$\begin{aligned} f\left( (kx+y)^2\right) =\gamma _{kx+y}f(kx+y)^2. \end{aligned}$$

Since

$$\begin{aligned} k^2f(x^2)+f(y^2)+kf(xy+yx)=k^2\gamma _xf(x)^2+\gamma _y f(y)^2+kf(xy+yx), \end{aligned}$$

it follows that

$$\begin{aligned}&k^2\left( \gamma _x-\gamma _{kx+y}\right) f(x)^2 + \left( \gamma _y-\gamma _{kx+y}\right) f(y)^2 \\&\quad = k\left( 2\gamma _{kx+y}f(x)f(y)-f(xy+yx)\right) . \end{aligned}$$

Dividing both sides by \(k^2\), we get

$$\begin{aligned}&\left( \gamma _x-\gamma _{kx+y}\right) f(x)^2 + \frac{1}{k^2}\left( \gamma _y-\gamma _{kx+y}\right) f(y)^2 \\&\quad = \frac{1}{k}\left( 2\gamma _{kx+y}f(x)f(y)-f(xy+yx)\right) . \end{aligned}$$

Since \(|\gamma _{kx+y}|=1\) for each k, we have \(\lim _{k\rightarrow \infty } (\gamma _x-\gamma _{kx+y})f(x)^2=0\).

Since \(f(x)\ne 0\), we conclude that \(\gamma _x=\lim _{k\rightarrow \infty }\gamma _{kx+y}\). But \(\gamma _{kx+y}^{n-1}=1\) and hence \(\gamma _{kx+y}\) can only take \(n-1\) values on the unit circle. Therefore, for large enough k, \(\gamma _{kx+y}=\gamma _x\) and hence, by the previous formula

$$\begin{aligned} (\gamma _y-\gamma _x)f(y)^2=k(2\gamma _x f(x)f(y)-f(xy+yx)), \end{aligned}$$

for large enough k. By taking limit when \(k\rightarrow \infty \), it follows that \(2\gamma _xf(x)f(y)=f(xy+yx)\). Since \(f(y)\ne 0\) we conclude that \(\gamma _x=\gamma _y\). \(\square \)

Lemma 2.7

Let \(f:A\rightarrow {\mathbb {C}}\) be an additive map on a ring A. If there exists a non-zero \(\gamma \in {\mathbb {C}}\) such that \(f(x^2)=\gamma f(x)^2\) for every \(x\in A\), then \(f(a_1a_2\cdots a_n)=\gamma ^{n-1}f(a_1)f(a_2)\cdots f(a_n)\) for all \(a_1,a_2,\ldots ,a_n\in A\), where \(n\ge 2\).

Proof

Let \(x,y\in A\). Then, \(f\left( (x+y)^2\right) =\gamma f(x+y)^2\) and hence

$$\begin{aligned} f(xy+yx)=2\gamma f(x)f(y). \end{aligned}$$
(2.2)

Thus

$$\begin{aligned} f(xy^2+y^2x)=2\gamma f(x)f(y^2)=2\gamma ^2 f(x)f(y)^2. \end{aligned}$$

Again substituting x by \(xy+yx\) in (2), we obtain

$$\begin{aligned} f((xy+yx)y+y(xy+yx))=2\gamma f(xy+yx)f(y). \end{aligned}$$

Hence \(f(xy^2+2yxy+y^2x)=4\gamma ^2f(x)f(y)^2\) and so \(f(yxy)=\gamma ^2f(x)f(y)^2\). Similarly, we have \(f(xyx)=\gamma ^2 f(y)f(x)^2\). Substituting x by xy and y by yx in (2), we conclude that

$$\begin{aligned} f(xy^2x+yx^2y)=2\gamma f(xy)f(yx). \end{aligned}$$
(2.3)

Moreover, we have

$$\begin{aligned} f(yx^2y)=\gamma ^2 f(x^2)f(y)^2=\gamma ^3 f(x)^2 f(y)^2, \end{aligned}$$

and

$$\begin{aligned} f(xy^2x)=\gamma ^2 f(y^2)f(x)^2=\gamma ^3 f(y)^2 f(x)^2. \end{aligned}$$

Since \(\gamma \ne 0\), by (3) it follows that\(\gamma ^2f(x)^2f(y)^2=f(xy)f(yx)\). On the other hand, by (2) we have

$$\begin{aligned} f(xy)^2+f(yx)^2+2f(xy)f(yx)=4\gamma ^2 f(x)^2 f(y)^2=4f(xy)f(yx). \end{aligned}$$

Therefore, \(f(xy)=f(yx)=\gamma f(x)f(y)\), for every \(x,y\in A\).

Now let \(a_1,a_2,\ldots ,a_n\in A\) and take \(x=a_1\), \(y=a_2a_3\) in the formula above. Then,

$$\begin{aligned} f(a_1a_2a_3)=\gamma f(a_1)f(a_2a_3)=\gamma ^2 f(a_1)f(a_2)f(a_3). \end{aligned}$$

Continuing in this way, we conclude that

$$\begin{aligned} f(a_1a_2\cdots a_n)=\gamma ^{n-1}f(a_1)f(a_2)\cdots f(a_n). \end{aligned}$$

\(\square \)

We now obtain the following result, which is an extension of Theorem 1.2.

Theorem 2.8

Let A be a ring and \(f:A\rightarrow {\mathbb {C}}\) be an n-Jordan homomorphism. Then, f is an n-homomorphism. In particular, if A is a Banach algebra and f is also linear, then f is automatically continuous.

Proof

By Theorem 2.6, there exists \(\gamma \in {\mathbb {C}}\) such that \(\gamma ^{n-1}=1\) and \(f(x^2)=\gamma f(x)^2\) for all \(x\in A\). Hence, by Lemma 2.7, \(f(a_1a_2\cdots a_n)=f(a_1)f(a_2)\cdots f(a_n)\) for all \(a_1,a_2,\ldots ,a_n\in A\). that is, f is an n-homomorphism. When A is a Banach algebra f is automatically continuous by [11, Theorem 2.7] or [7, Theorem 2.4]. \(\square \)

We now extend the theorem above to more general cases.

Theorem 2.9

Let A and B be rings such that \( M_B\), the set of all non-zero additive and multiplicative complex functionals on B, is non-empty and moreover, \(\bigcap _{\varphi \in M_B} ker\varphi =\{0\}\). Then every n-Jordan homomorphism \(f: A\rightarrow B\) is an n-homomorphism.

Proof

Let \(\varphi \in M_B\) and define \(\psi :A\rightarrow {\mathbb {C}}\) by \(\psi =\varphi \circ f\). Clearly, \(\psi \) is additive and

$$\begin{aligned} \psi (x^n)=\varphi (f(x^n))=\varphi (f(x)^n)=(\varphi (f(x)))^n=(\psi (x))^n. \end{aligned}$$

By Theorem 2.8, \(\psi \) is an n-homomorphism and hence

$$\begin{aligned} \psi (a_1a_2\cdots a_n)=\psi (a_1)\psi (a_2)\cdots \psi (a_n) \end{aligned}$$

for \(a_1,a_2,\dots , a_n\in A\). Therefore,

$$\begin{aligned} \varphi (f(a_1a_2\cdots a_n))=\varphi (f(a_1))\varphi (f(a_2))\cdots \varphi (f(a_n))=\varphi (f(a_1)f(a_2)\cdots f(a_n)). \end{aligned}$$

Consequently, \(\varphi (f(a_1a_2\cdots a_n)-f(a_1)f(a_2)\cdots f(a_n))=0\), that is,

$$\begin{aligned} f(a_1a_2\cdots a_n)-f(a_1)f(a_2)\cdots f(a_n)\in ker \varphi . \end{aligned}$$

Since \(\varphi \in M_B\) is arbitrary,

$$\begin{aligned} f(a_1a_2\cdots a_n)-f(a_1)f(a_2)\cdots f(a_n) \in \cap _{\varphi \in M_B}ker\varphi =\{0\}. \end{aligned}$$

That is, \(f(a_1a_2\cdots a_n)=f(a_1)f(a_2)\cdots f(a_n)\). \(\square \)

Corollary 2.10

Let A be a ring and B be a unital commutative semisimple Banach algebra. Then every n-Jordan homomorphism \(f: A\rightarrow B\) is an n-homomorphism. In particular, if A is a unital Banach algebra and moreover f is linear, then f is automatically continuous.

Proof

Since B is a unital commutative semisimple Banach algebra \(\Phi _B\ne \phi \), where \(\Phi _B\) is the set of all nonzero multiplicative linear functionals on B. Since \(\Phi _B\subseteqq M_B\) and B is semisimple, we have

$$\begin{aligned} \cap _{\varphi \in M_B}ker\varphi \subseteqq \cap _{\varphi \in \Phi _B}ker\varphi =rad(B)=\{0\}. \end{aligned}$$

Therefore, by the theorem f is an n-homomorphism. If A is a unital Banach algebra and f is also linear, then it is a multiple of a homomorphism by [9, Proposition 2.2]. Hence, f is automatically continuous by a classical result of Shilov, which states that every homomorphism from a Banach algebra into a commutative semisimple Banach algebra is automatically continuous. \(\square \)

Note that Theorem 2.9 and Corollary 2.10 are extensions of Theorem 1.1, which is due to Żelazko.