1 Introduction

The use of higher-dimensional spacetimes to explain our physical world has a long history in physics. Indeed, even prior to the publication of the final form of general relativity, Nordström [1] made use of a five-dimensional spacetime in order to unify gravity and electromagnetism into a single scheme. Few years later, under the light of general relativity, Kaluza and Klein [2,3,4] made this possibility clearer in influential works whose concepts are of relevance until now. However, the idea that the universe can have more that four dimensions started to spread and be considered by a bigger community around the 70s, when string theory arose as a possibility of providing a quantum theory of gravity [5]. According to the current interpretation, the reason why we are not used to notice the six extra dimensions necessary in string theory is that they are very small and, therefore, can only be probed through highly energetic experiments. Nevertheless, from the theoretical point of view, it is also possible to reconcile our impression that we live in a four-dimensional world with the existence of large extra dimensions [6, 7]. In this scenario, the interactions of the standard model are restricted to a four-dimensional brane while gravity permeates all dimensions. Even infinity extra dimensions are not necessarily in contradiction with our daily experiences [7, 8]. Nevertheless, it is fair to say that astrophysical and earth-based high energy experiments have put huge constraints in the possibility of existing extra dimensions of sizes much greater than the Planck length [9, 10]. Nowadays, another important source of attention for higher-dimensional spacetimes is the AdS/CFT correspondence [11], which relates a gravitational theory in the bulk of an n-dimensional spacetime with a conformal field theory in the \((n-1)\)-dimensional boundary. Due to all these branches of physics that make use of higher-dimensional spacetimes, it is increasing the amount of research in such subject.

The Schwarzschild-de Sitter black hole is not in thermodynamical equilibrium, since the temperatures of the black hole horizon and cosmological horizon are not the same. As the limit of equal temperatures is taken, the two horizons approach each other and the outcome of this limit process is the Nariai spacetime [12, 13], a solution first found in Ref. [14]. The Nariai metric is a four-dimensional vacuum solution of Einstein’s field equation in the presence of a positive cosmological constant that is the direct product of two spaces of constant curvature, namely \(dS_2\) and \(S^2\). Analogously, the so-called anti-Nariai, Bertotti–Robinson and Plabański–Hacyan solutions are other vacuum solutions formed by the direct product of two spaces of constant curvature [15,16,17,18]. For an account of impulsive gravitational waves in these spacetimes, see [18, 19], while the thermodynamics of the Nariai spacetime have been considered in Ref. [20].

An electrically charged higher-dimensional generalization of the Nariai spacetime have been obtained in Ref. [21]. This solution of Einstein–Maxwell equations is the direct product of the spaces \(dS_2\) and \(S^{n-2}\), and can be obtained from Schwarzschild–Tangherlini black hole in the limit of equal temperatures of the horizons, as proved in [22]. Here, we will present a different higher-dimensional generalization of the Nariai solution that is formed from the direct product of \(dS_2\) with several 2-spheres possessing different radii. One interesting feature of the latter solution is that, besides having an electric charge, it also admits several magnetic charges, diversely from the solutions obtained in Refs. [21, 22], which have no magnetic charge at all. In addition, we will investigate whether these new generalized Nariai spacetimes are associated to black holes and if they have counterparts in theories of gravity that are more general than Einstein’s theory.

The outline of the article is the following. In Sect. 2, the new higher-dimensional generalizations of Nariai solutions are presented and some of their geometrical and physical properties are investigated. Moreover, we also obtain higher-dimensional extensions of anti-Nariai, Bertotti–Robinson and Plabański–Hacyan solutions. Then, in Sect. 3, we use the generalized Nariai metrics to obtain black hole solutions for Einstein–Maxwell equations. In Sect. 4, we investigate metrics made from the product of 2-spaces of constant curvature that are solutions for more general gravitational theories coupled to an electromagnetic field through a minimal coupling. Finally, in Sect. 5, we summarize the results and discuss some perspectives.

2 Generalized charged Nariai solutions in Einstein’s theory

In this starting section we are interested in obtaining solutions for a gravitational system interacting, via minimal coupling, with an electromagnetic field and a cosmological constant \(\Lambda \). The system is described by the following action

$$\begin{aligned} \mathcal {S} \,=\,\int \sqrt{-g} \left[ \mathcal {R} \,-\,(n-2) \, \Lambda \,-\,\frac{1}{4}\,\mathcal {F}^{cd}\mathcal {F}_{cd} \right] , \end{aligned}$$

where \(\mathcal {F}_{ab} = \nabla _{[a}\mathcal {A}_{b]}\) is the electromagnetic field, \(\mathcal {R}\) stands for the Ricci scalar and n is the dimension of the spacetime. The field equations of this system are:

$$\begin{aligned} \mathcal {R}_{ab} - \frac{1}{2}\,\mathcal {F}_a^{\phantom {a}c}\mathcal {F}_{bc}= & {} \frac{g_{ab}}{2} \left[ \mathcal {R} - (n-2) \Lambda - \frac{1}{4}\,\mathcal {F}^{cd}\mathcal {F}_{cd} \right] \nonumber \\&\text {and} \quad \nabla ^a\mathcal {F}_{ab} \, = \, 0. \end{aligned}$$
(1)

In order to write the solutions that will be presented in the sequel, it is useful to adopt the notation

$$\begin{aligned} d\Omega _j^2 = d\theta _j^2 \,+\,\sin ^2\theta _j\,d\phi _j^2 \end{aligned}$$

to represent the line element of the unit sphere \(S^2\). In what follows, we will assume that the dimension n is even and that the index j ranges from 2 to n / 2.

The first result presented here is that a static solution for the equations of motion (1) is provided by the following fields:

$$\begin{aligned} ds^2= & {} R_1^2( - \sin ^2x\,dt^2 + dx^2 ) + \sum _{j=2}^{n/2}\,R_j^2\,d\Omega _j^2 \,, \nonumber \\ \varvec{\mathcal {F}}= & {} q_1 R_1^2 \sin x \, dt\wedge dx + \sum _{j=2}^{n/2}\,q_j R_j^2 \sin \theta _j \,d\phi _j\wedge d\theta _j, \end{aligned}$$
(2)

where \(q_1\) is an electric charge and \(q_j\) are magnetic charges. The radii \(R_1\) and \(R_j\) are real constants that are related to the charges and the cosmological constants by the subsequent relations:

$$\begin{aligned} R_1 =&\left[ \, \Lambda \,-\,\frac{1}{2} q_1^2 \,+\,\frac{Q}{2(n-2)} \,\right] ^{-1/2} \;, \end{aligned}$$
(3)
$$\begin{aligned} R_j =&\left[ \, \Lambda \,+\,\frac{1}{2} q_j^2 \,+\,\frac{Q}{2(n-2)} \,\right] ^{-1/2} \;, \end{aligned}$$
(4)

where

$$\begin{aligned} Q \, \equiv \, q_1^2 \,-\,\sum _{j=2}^{n/2}\, q_j^2 \,. \end{aligned}$$
(5)

One can check that in order for the radii to be real, which assures the Lorentzian signature, the following constraint must be satisfied by the cosmological constant:

$$\begin{aligned} 2\,(n-2)\,\Lambda \, \ge \, (n-3) \, q_1^2 \,+\,\sum _{j=2}^{n/2}\, q_j^2 \,. \end{aligned}$$
(6)

In particular, the cosmological constant must be positive. If \(n\ne 4\), the relations (3) and (4) can be inverted to write the charges \(q_1\) and \(q_j\) in terms of the radii, the final result being

$$\begin{aligned} q_1 =&\sqrt{ \,\, \frac{4\,(n-2)}{(n-4)} \Lambda \,-\,\frac{4}{(n-4)R_0^2} \,-\,\frac{2}{R_1^2} \,} \;, \end{aligned}$$
(7)
$$\begin{aligned} q_j =&\sqrt{ -\, \frac{4\,(n-2)}{(n-4)} \Lambda \,+\,\frac{4}{(n-4)R_0^2} \,+\,\frac{2}{R_j^2} \,} \;, \end{aligned}$$
(8)

with \(R_0\) being defined by

$$\begin{aligned} \frac{1}{R_0^2} \,\equiv \, \frac{1}{R_1^2} \,+\,\sum _{j=2}^{n/2}\, \frac{1}{R_j^2} \,. \end{aligned}$$

Thus, instead of considering the electromagnetic charges as being arbitrary, we can, equivalently, suppose that the radii \(R_1\) and \(R_j\) are arbitrary, while the charges are determined in terms of these radii by Eqs. (7) and (8). This is quite interesting from the point of view of compactification of extra dimensions, since we can set \(R_1\) and \(R_2\) to be much bigger than the other radii. However, this freedom of choosing either \(\{q_1,q_j\}\) or \(\{R_1, R_j\}\) as being the independent parameters is not valid in the particular case \(n=4\), as can already be grasped from Eqs. (7) and (8), which diverge in such a case. Indeed, by means of Eqs. (3) and (4) one can see that if \(n=4\) the radii \(R_1\) and \(R_2\) are not independent from each other, they must obey the constraint

$$\begin{aligned} \frac{1}{R_1^2} \,+\,\frac{1}{R_2^2} \,=\,2 \, \Lambda . \end{aligned}$$

Thus, when \(n=4\) the solution presented here reduces to the well-known charged Nariai solution [14]. Therefore, the metric (2) should be seen as a higher-dimensional generalization of the Nariai solution.

Just as the Nariai solution, the higher-dimensional version of the Nariai spacetime presented here has no singularities. Indeed, its Riemann tensor and its Weyl tensor are both covariantly constant and, therefore, all invariant scalars that can be constructed from the curvature are constant. For instance, the full contractions of the products of the Riemann tensor are given by

These generalized Nariai spacetimes are contained in the Kundt class of metrics [23, 24], inasmuch as the null directions

$$\begin{aligned} \varvec{\ell } = \csc x \,\partial _t + \partial _x \quad \text {and} \quad \varvec{n} = \csc x \,\partial _t - \partial _x \end{aligned}$$

are geodesic, shear-free, twist-free and expansion-free. They are also repeated principal null directions of the Weyl tensor [25,26,27],

$$\begin{aligned} C_{ab[cd}\,\ell _{e]} \ell ^b = 0 = C_{ab[cd}\, n_{e]} n^{b}, \end{aligned}$$

so that, according to the boost weight classification [28, 29], the algebraic type of the Weyl tensor is D. These properties are also in agreement with the four-dimensional Nariai solution.

Using the coordinates \(\tau =R_1\,t\) and \(r = R_1 \cos x\), the line element of the generalized Nariai spacetime is written as

$$\begin{aligned} ds^2 = -\,h(r)\,d\tau ^2 + \frac{1}{h(r)} dr^2 + \sum _{j=2}^{n/2}\,R_j^2\,d\Omega _j^{2}, \end{aligned}$$

where \(h(r) = 1 - r^2/R_1^2\). In these coordinates, it is clear that the hyper-surfaces \(r=\pm R_1\) are closed null surfaces and comprise event horizons. The entropies of these horizons are given by one quarter of their area,

$$\begin{aligned} S \,=\,\frac{1}{4}\, \prod _{j=2}^{n/2}\,4\,\pi \,R_j^{2}. \end{aligned}$$
(9)

These null hyper-surfaces are Killing horizons associated to the Killing vector \(\partial _\tau \). In order to calculate the temperature of such horizons, one must compute the surface acceleration of the of this Killing vector,

$$\begin{aligned} \kappa = \left. \sqrt{-\,\frac{1}{2}\, \nabla ^a \xi ^b \,\nabla _a \xi _b } \, \right| _{r=r_h} \,, \end{aligned}$$
(10)

where \(r_h\) is the value of the coordinate r at the horizon and \(\xi ^a\) is the Killing vector field properly normalised. A natural way to normalize \(\varvec{\xi } = \lambda \, \partial _\tau \) is to choose the multiplicative constant \(\lambda \) in such a way that \(\xi ^a\xi _a = -1\) at the value of \(r=r_{\star }\) for which \(\varvec{\xi }\) is a geodesic vector field, just as happens at the asymptotic infinity of an asymptotically flat spacetime [13]. At \(r=r_{\star }\) the gravitational, electromagnetic and cosmological forces balance each other and the observer can stay still without acceleration. Computing the Christoffel symbol \(\Gamma ^a_{\tau \tau }\), we see that this value of r is the one for which \(h^{\prime }(r_{\star }) = 0\), with \(h^{\prime }(r)\) standing for the derivative of h(r) with respect to r. Therefore, the normalized Killing vector field and the temperature of the horizon are respectively given by

$$\begin{aligned} \varvec{\xi } = \frac{1}{\sqrt{h(r_{\star })}}\, \partial _\tau \quad \text {and} \quad T \,=\,\frac{\kappa }{2\pi } = \frac{|h^{\prime }(r_h)|}{4\,\pi \,\sqrt{h(r_{\star })} } \end{aligned}$$

In the case of the metric considered here, we have \(r_h= \pm R_1\) and \(r_{\star } = 0\), so that the temperature of the horizons of the generalized Nariai solutions considered here is

$$\begin{aligned} T = \frac{1}{2\,\pi \,R_1} \,. \end{aligned}$$

This is the temperature measured by a still observer at \(r=0\). Of course, other observers should measure different temperatures. For a nice account on the thermodynamics of the four-dimensional Nariai spacetime, the reader is referred to Ref. [20].

We have seen that, due to Eq. (6), these generalized Nariai solutions exist only for positive cosmological constant. Nonetheless, it is also possible to make analytical continuations on the coordinates and find the analogue of the latter solution in the case of negative cosmological constant, obtaining a generalized anti-Nariai solution. Indeed, the line element (2) is the direct product of the de Sitter space \(dS_2\) with \((\frac{n}{2} -1)\) copies of the sphere \(S^2\), which are both two-dimensional spaces of constant positive curvatures. Thus, in an analogous fashion, we can find a solution whose metric is the product of spaces of constant negative curvatures, namely the product of anti-de Sitter space \(AdS_2\) with \((\frac{n}{2} -1)\) copies of a hyperboloid \(H^2\), in which case the cosmological constant can be negative. Actually, we can go one step further and consider the ansatz of a spacetime whose metric is the direct product of 2-spaces of arbitrary constant curvature, which provides a generalization of Bertotti–Robinson and Plebański–Hacyan four-dimensional solutions [15,16,17]. In order to accomplish this goal it is useful to define the following function depending on a discrete parameter \(\epsilon \):

$$\begin{aligned} S_{\epsilon }(\theta ) = \frac{1}{\sqrt{\epsilon }}\,\sin (\sqrt{\epsilon } \,\theta ) = \left\{ \begin{array}{ll} \sin \theta ,\; &{}\quad \text {if }\epsilon = 1 \\ \;\;\theta ,\; &{}\quad \text {if }\epsilon = 0 \\ \sinh \theta ,\; &{}\quad \text {if }\epsilon = -1. \end{array} \right. \end{aligned}$$
(11)

Then, the line element of a constant curvature two-dimensional space can be conveniently written as

$$\begin{aligned} d\tilde{\Omega }_{\epsilon _j}^2 = d\theta _j^2 \,+\,S_{\epsilon _j}(\theta _j)^2\,d\phi _j^2, \end{aligned}$$
(12)

with the case \(\epsilon _j = 1\) representing a sphere, the plane being represented by \(\epsilon _j = 0\), while the hyperboloid corresponds to \(\epsilon _j = -1\). Then, we shall seek for solutions whose line elements are given by

$$\begin{aligned} ds^2 = R_1^2\left[ - S_{\epsilon _1}(x)^2\,dt^2 + dx^2 \right] + \sum _{j=2}^{n/2}\,R_j^2 \, d\tilde{\Omega }_{\epsilon _j}^2. \end{aligned}$$
(13)

One can check that metric (13) is a solution of the field equations (1) when \(n\ge 6\) provided that the electromagnetic field is given by

$$\begin{aligned} \varvec{\mathcal {F}} = q_1 \, R_1^2 \, S_{\epsilon _1}(x) \, dt\wedge dx + \sum _{j=2}^{n/2}\,q_j\, R_j^2\, S_{\epsilon _j}(\theta _j) \,d\phi _j\wedge d\theta _j, \end{aligned}$$

where the electric charge \(q_1\) and the magnetic charges \(q_j\) might be given by the following relations respectively

$$\begin{aligned} q_1 =&\sqrt{ \,\, \frac{4\,(n-2)}{(n-4)} \Lambda \,-\,\frac{4}{(n-4)\tilde{R}_0^2} \,-\,\frac{2\,\epsilon _1}{R_1^2} \,} \;, \end{aligned}$$
(14)
$$\begin{aligned} q_j =&\sqrt{ -\,\frac{4\,(n-2)}{(n-4)} \Lambda \,+\,\frac{4}{(n-4)\tilde{R}_0^2} \,+\,\frac{2\,\epsilon _j}{R_j^2} \,} \;. \end{aligned}$$
(15)

The constant \(\tilde{R}_0\) used in the latter expression is defined by

$$\begin{aligned} \frac{1}{\tilde{R}_0^2} \,\equiv \, \frac{\epsilon _1}{R_1^2} \,+\,\sum _{j=2}^{n/2}\, \frac{\epsilon _j}{R_j^2}. \end{aligned}$$
(16)

Now, let us define the following 1-forms constituting a local basis:

$$\begin{aligned} \left. \begin{array}{ll} \varvec{e}_1 \,=\,R_1\, S_{\epsilon _1}(x)\, \,dt, \;\;&{} \quad \tilde{\varvec{e}}_{1} = R_1\, dx \\ \varvec{e}_j = R_j\, S_{\epsilon _j}(\theta _j) d\phi _j, \;\; &{} \quad \tilde{\varvec{e}}_{j} = R_j\, d\theta _j. \end{array} \right. \end{aligned}$$
(17)

Then, the vector fields associated to these 1-forms by means of the metric comprise a Lorentz frame. In terms of such basis, the electromagnetic field is given by

$$\begin{aligned} \varvec{\mathcal {F}} = q_1 \,\varvec{e}_1\wedge \tilde{\varvec{e}}_{1} \,+\,\sum _{j=2}^{n/2}\,q_j\,\varvec{e}_j\wedge \tilde{\varvec{e}}_{j}. \end{aligned}$$

Since the components of \(\varvec{\mathcal {F}}\) in this Lorentz frame are constant, we interpret it as a uniform electromagnetic field throughout the spacetime.

From Eqs. (14) and (15), one can grasp that if either \(\epsilon _1\) or some \(\epsilon _j\) vanish then these equations cannot be inverted to write the radii \(R_1\) and \(R_j\) in terms of the charges \(q_1\) and \(q_j\). For example, let us say that \(\epsilon _1 = 0\), then the expressions of \(q_1\) and \(q_j\) do not depend on \(R_1\), so that, generally, we cannot write \(R_1\) as a function of the electromagnetic charges. Nevertheless, if none of the 2-spaces that form the metric is flat, namely if \(\epsilon _1\) and \(\epsilon _j\) are all different from zero, then Eqs. (14) and (15) can be inverted and solved for the radii \(R_1\) and \(R_j\) in terms of the charges \(q_1\) and \(q_j\). In the latter case, the electromagnetic charges can be arbitrarily assigned to the solution.

A different generalization of the charged Nariai solution to higher dimensions has also been found elsewhere [21, 22], but such spacetime is the direct product of just two spaces of constant curvature, namely \(AdS_2\times S^{n-2}\). On the other hand, the metric presented here is the direct product of several 2-spaces of constant curvature. It is also worth pointing out that whereas the solution presented in Refs. [21, 22] admits no magnetic charge at all, which is related to the fact that the second Betti number of the sphere \(S^{n-2}\) is different from zero only if \(n=4\) [30], the solution obtained here has several magnetic charges. This interesting feature makes these metrics a rich arena for studying the physics of higher-dimensional spacetimes. After the release of the pre-print of this article, Marcello Ortaggio kindly warned that the purely magnetic case of the solutions presented here, namely when \(q_1=0\), is contained in the broad class of solutions obtained in Ref. [31].

3 Associated black hole solutions

It is well-known that the four-dimensional Nariai solution can be obtained from the Schwarzschild-de Sitter metric in the limit that the temperature of the black hole horizon coincides with the temperature of the cosmological horizon. Indeed, the Nariai solution is the metric perceived by an observer between the two horizons as they coalesce into a single hyper-surface. Since the coordinate range between the two horizons shrinks to zero as the temperatures of the horizons approach each other, a careful near horizon limit must be taken in order to obtain Nariai metric [12, 13]. Therefore, it is natural to think that a similar approach works in higher dimensions. Indeed, this was the path taken in Ref. [22] to obtain another higher-dimensional generalization of the Nariai solution. In the latter reference, the limit of equal temperatures of the horizons of the Schwarzschild–Tangherlini solution [32] have been taken and the final result was a spacetime of the form \(AdS_2\times S^{n-2}\).

Here, we already have a higher-dimensional generalization of the Nariai solution. Thus, we could think the other way around: are the generalized Nariai metrics obtained in this article related to black hole solutions? In order to answer this question, let us investigate whether it is possible to attain the metric (2) from a black hole solution with coalescing horizons. Let us start with the following general static black hole ansatz that has the same topology of the spacetime presented in Eq. (2):

$$\begin{aligned} ds^2 = -\, f(r) \, d\tilde{t}^{\,2} + \frac{1}{f(r)}\, dr^2 + \sum _{j=2}^{n/2}\,R_j(r)^2\,d\Omega _j^2 \,. \end{aligned}$$
(18)

Then, we take the limit in which two horizons have the same temperature while the horizons coalesce into a single surface \(r=r_h\). The hallmark of a degenerate horizon is that f(r) and \(f^{\prime }(r)\) both vanish at the horizon, so that near the horizon we can write

$$\begin{aligned} f(r_h + \rho ) \,=\,- \, \lambda \, \rho ^2 + O(\rho ^3), \end{aligned}$$

where \(\lambda \) is some non-vanishing constant. Therefore, using \(\rho = r - r_h\) as a coordinate while we take the near horizon limit, the general ansatz (18) becomes

$$\begin{aligned} ds^2 = \lambda \, \rho ^2 \, d\tilde{t}^{\,2} - \frac{1}{\lambda \,\rho ^2}\, d\rho ^2 + \sum _{j=2}^{n/2}\,R_j(r_h)^2\,d\Omega _j^2 \,. \end{aligned}$$
(19)

Then, defining \(\tilde{t}= \lambda ^{-1}\,e^{-t}\, \cot x\), \(\rho = e^{t}\,\sin x\), \(R_j= R_j({r}_h)\) and \(R_1= \lambda ^{-1/2}\), we retrieve the generalized Nariai spacetime (2). Therefore, we conclude that the generalized Nariai solution presented here induces the search for static black hole solutions of the form (18), which we do in the sequel.

Before proceeding, it is useful to introduce the following notation:

$$\begin{aligned} \mathcal {E}_{ab} \,\equiv \, \left( \mathcal {R}_{ab} - \frac{1}{2}g_{ab}\mathcal {R}\right) - \mathcal {T}_{ab}, \end{aligned}$$

where \(\mathcal {T}_{ab}\) is the energy-momentum tensor of the electromagnetic field. Then, the condition \(\mathcal {E}^a_{\;\;b} \,=\,0\) is just Einstein’s equation (1).

In spite of the simplicity of the line element (18), it turns out that it is quite hard to integrate Einstein–Maxwell equations for this metric in the general case. Therefore, we shall make some simplifying assumptions. First, inspired by Eq. (2), let us adopt the following ansatz for the electromagnetic field

$$\begin{aligned} \varvec{\mathcal {F}} = F_1(r) \, d\tilde{t}\wedge dr + \sum _{j=2}^{n/2}\,F_j(r) \sin \theta _j \,d\phi _j\wedge d\theta _j. \end{aligned}$$
(20)

Even with the latter assumption, it is difficult to integrate Einstein’s equation without making restrictions over the functions \(R_j(r)\) that appear in the metric (18). Nevertheless, imposing equation \(\mathcal {E}^{\tilde{t}}_{\;\;\tilde{t}} - \mathcal {E}^r_{\;\;r} = 0\), we find that the following condition must hold:

$$\begin{aligned} \sum _{j=2}^{n/2}\, \frac{R^{\prime \prime }_j(r)}{R_j(r)} \,=\,0. \end{aligned}$$
(21)

The simplest solution for the latter equation is attained when each term of the above sum vanishes, in which case the functions \(R_j(r)\) have a linear dependence on r:

$$\begin{aligned} R_j(r) \,=\,a_j\,r \,+\,b_j, \end{aligned}$$
(22)

where \(a_j\) and \(b_j\) are constants. In particular, when the constants \(a_j\) are all zero we retrieve the generalized Nariai metric (2). Another case that is not so alluring happens when just one of the constants \(a_j\) is non-vanishing, in which case we obtain the direct product of the Reissner–Nordström solution with \(\frac{n-4}{2}\) spheres of constant radii.

A particularly interesting case happens when we assume that \(a_j\) are non-vanishing and the constants \(b_j\) in Eq. (22) are all equal. In such a case, we can redefine the origin of the coordinate r so that the constants \(b_j\) vanish. Then, after some calculations, the integration of the field equations leads to the following black hole solution:

$$\begin{aligned} ds^2= & {} -\, f(r) \, d\tilde{t}^{\,2} + \frac{1}{f(r)}\, dr^2 + r^2\, \sum _{j=2}^{n/2}\,d\Omega _j^2 \,, \nonumber \\ \varvec{\mathcal {F}}= & {} \sqrt{2(n-2)(n-3)}\, \frac{q_1}{r^{n-2}}\,d\tilde{t}\wedge dr \nonumber \\&+ 2\,q_2\,\sum _{j=2}^{n/2}\,\sin \theta _j \,d\phi _j\wedge d\theta _j, \end{aligned}$$
(23)

where the constants \(q_1\) and \(q_2\) are arbitrary parameters proportional to the electric and magnetic charges respectively, while the function f(r) is given by

$$\begin{aligned} f(r) = \frac{1}{n-3} - \frac{2\,\mu }{r^{n-3}} + \frac{q_1^2}{r^{2(n-3)}}-\frac{q_2^2}{(n-5)r^2} - \frac{\Lambda \,r^2}{n-1} \,, \end{aligned}$$
(24)

with \(\mu \) being an arbitrary constant. The latter parameter is proportional to the mass, i.e., it is proportional to the conserved charge associated to the Killing vector field \(\partial _{\tilde{t}}\). One interesting feature of this solution is that it only has one magnetic charge \(q_2\), whereas in the generalized Nariai solution (2) a different charge can be assigned for each sphere factor in the line element. As a consequence, all sphere factors in the black hole solution (23) must have the same radius. Note that we started the integration process with arbitrary coefficients \(a_j\) and, in principle, they were independent from each other. Nonetheless, the field equations impose that all the constants \(a_j\) must coincide, leading to the same radius and magnetic charge for each sphere factor. This black hole solution has already been obtained in Ref. [33], as a particular case of a broader solution in which the \(\left( n-2\right) \)-dimensional spatial part of the metric is an Einstein manifold possessing an almost-Kähler structure. Moreover, the cases \(q_2=0\) (purely electric) and \(q_1=0\) (purely magnetic) of this black hole solution can be attained in the limit of Einstein–Maxwell theory from the solutions found in Ref. [30].

The spacetime presented in Eq. (23) has a singularity at \(r=0\), which is indicated by the fact that the Kretschmann scalar diverges in the limit \(r\rightarrow 0\). Also, the null vector fields

$$\begin{aligned} \varvec{\ell } = \frac{1}{\sqrt{f}} \,\partial _{\tilde{t}} + \sqrt{f} \,\partial _r \quad \text {and} \quad \varvec{n} = \frac{1}{\sqrt{f}} \,\partial _{\tilde{t}} - \sqrt{f} \,\partial _r \end{aligned}$$
(25)

are repeated principal null directions of the Weyl tensor [25,26,27],

$$\begin{aligned} C_{ab[cd}\,\ell _{e]} \ell ^b = 0 = C_{ab[cd}\, n_{e]} n^b. \end{aligned}$$

Therefore, according to the boost weight classification [28, 29], the algebraic type of this spacetime is D. The latter classification is a generalization of the Petrov classification to arbitrary dimension. These repeated principal null directions are geodesic, shear-free and twist-free, but have non-zero expansion. Thus, the solution presented here is contained in the Robinson–Trautman class of spacetimes [34, 35].

In the special case \(n=4\), the solution (23) reduces to the well-known Reissner–Nordström solution in the presence of a cosmological constant, with \(\mu \) denoting the mass, \(q_1\) is the electric charge and \(q_2\) is the magnetic charge. However, for \(n>4\) the solution presented here differs, in several respects, from the charged version of the Schwarzschild–Tangherlini spacetime. First, the topology of the spatial infinity and of the horizons are different in both cases. For instance, while the topology of the horizon in Schwarzschild–Tangherlini spacetime is \(\mathbb {R}\times S^{n-2}\), in the solution presented here the topology of the horizon is the cartesian product of a real line with several 2-spheres. Second, note that the additive constant term in the function f(r) is different from 1 if \(n\ne 4\), and this constant factor cannot be modified by a coordinate transformation. Moreover, a higher-dimensional Schwarzschild metric possessing a magnetic charge does not exist, which is related to the fact that the second Betti number of the sphere \(S^{n-2}\) is different from zero only if \(n=4\) [30]. Regarding the magnetic charge \(q_2\), it is also worth stressing that the sign of in front of \(q_2^2\) in Eq. (24) becomes negative if \(n\ge 6\), which implies the existence of an event horizon even in the case of vanishing mass parameter \(\mu \).

Besides the Killing vector field \(\partial _{\tilde{t}}\), each sphere factor of the metric (23) provides three space-like Killing vector fields for the spacetime, so that the total number of Killing vector fields is \(\frac{3}{2}n-2\). On the other hand, the Schwarzschild–Tangherlini spacetime possesses \(\frac{1}{2}n^2-\frac{3}{2}n+2\) Killing vectors. Besides, for each sphere factor of the line element (23) there exists a Killing-Yano tensor given by

$$\begin{aligned} \varvec{Y}_j \,=\,r^3\,\sin \theta _j\,d\theta _j\wedge d\phi _j. \end{aligned}$$

Nevertheless, the conserved quantities along the geodesic motion associated to these Killing-Yano tensors are not independent from the ones generated by the Killing vector fields.

Finally, let us analyse some thermodynamic properties of the black hole solution (23). In four dimensions, its is simple matter to interpret a magnetic charge and its associated potential, due to the electric/magnetic duality. Nevertheless, in higher dimensions these two phenomena have different features, and the physical interpretation of the thermodynamic variable conjugated to a magnetic charge is trickier. Hence, for simplicity, in what follows we will consider that the magnetic charge is zero, \(q_2 =0\). Being \(r_h\) the radius of the horizon, namely, the value of the larger root of f(r), the entropy of the horizon is just one quarter of its area:

$$\begin{aligned} S \,=\,\frac{1}{4}\, \prod _{j=2}^{n/2}\,4\,\pi \,(r_h)^2 \,. \end{aligned}$$

In its turn, the temperature is given by \(T\,=\,\kappa /(2\pi )\), where \(\kappa \) is the surface acceleration at the horizon, given by the expression (10) with the Killing vector being \(\varvec{\xi } = \partial _{\tilde{t}}\). Since the coordinate r is not suitable at the horizon, we must use another coordinate system in order to do the calculation of the temperature properly. For instance, using Eddington-Finkelstein coordinates we easily find

$$\begin{aligned} T \,=\,\frac{1}{2}\, f^{\prime }(r_h). \end{aligned}$$

In the presence of electric charges, the electromagnetic field obeys \( d \star \varvec{\mathcal {F}} = 16\pi \star \varvec{\mathcal {J}}\), where \(\varvec{\mathcal {J}}\) is the 1-form representing the electromagnetic current. Then, if \(\Omega \) is a space-like slice of the spacetime, the electric charge is given by:

$$\begin{aligned} Q&= \int _{\Omega } \star \varvec{\mathcal {J}} \,=\,\frac{1}{16\pi } \int _{\partial \Omega } \star \varvec{\mathcal {F}} \\&= \frac{(4\pi )^{\frac{n-2}{2}}}{16\pi }\,\sqrt{2(n-2)(n-3)}\,\,q_1. \end{aligned}$$

Denoting the 1-form potential of the electromagnetic field by \(\varvec{\mathcal {A}}\), the conjugated thermodynamic variable of the electric charge is the electric potential:

$$\begin{aligned} \Phi \,=\,\xi ^a\,\mathcal {A}_a|_{r=r_h} \,-\,\xi ^a\,\mathcal {A}_a|_{r=\infty } \,=\,\sqrt{\frac{2(n-2)}{n-3}}\,\frac{q_1}{(r_h)^{n-3}} \,. \end{aligned}$$

Finally, the Komar mass of the spacetime is given by:

$$\begin{aligned} M \,=\,\frac{n-2}{8\pi \,(n-3)} \, \int dS_{ab}\, \nabla ^a\,\xi ^b \,=\,\frac{n-2}{8\pi }\,(4\pi )^{\frac{n-2}{2}}\, \mu , \end{aligned}$$

where a divergent piece arising from the cosmological constant has been subtracted, in accordance with the usual procedure [36]. Using these expressions, we can check that the first law of thermodynamics holds, namely

$$\begin{aligned} dM \,=\,T\,dS \,+\,\Phi \,dQ. \end{aligned}$$

Concerning the Smarr formula, one would expect that a relation of the type \(M = \alpha _1 T S \,+\,\alpha _2 \Phi Q\) would be valid, for some constants \(\alpha _1\) and \(\alpha _2\). Nevertheless, this is no true. The reason is that the cosmological constant \(\Lambda \) should also be considered a thermodynamical variable, which is identified as the analogous of pressure [37, 38]. Indeed, the pressure is generally defined by

$$\begin{aligned} P \,=\,-\, \frac{\Lambda }{8\pi }. \end{aligned}$$

In this formalism, the mass is identified with the enthalpy, rather than the energy, so that the variable thermodynamically conjugated to P, the “volume”, is defined by

$$\begin{aligned} V \,=\,\left( \frac{\partial M}{\partial P} \right) _{S,Q} \,=\,\frac{n-2}{2(n-1)} \, (4\pi )^{\frac{n-2}{2}}\, (r_h)^{n-1}. \end{aligned}$$
(26)

In the latter derivation, its has been used the relation \(f(r_h)=0\) to write M in terms of S, Q and P. With these definitions, one can check that the broader first law

$$\begin{aligned} dM \,=\,T\,dS \,+\,\Phi \,dQ \,+\,V \, dP \end{aligned}$$

holds, as well as the Smarr formula

$$\begin{aligned} M \,=\,\frac{n-2}{n-3} \, S\, T \,+\,\Phi \, Q \,-\,\frac{2}{n-3}\, P\,V, \end{aligned}$$

which is in perfect accordance with the general results of Ref. [38]. As a final remark on the thermodynamical aspects of the solution (23), note that the thermodynamical volume (26) is generally different from the geometric volume of the space inside the horizon, which is

$$\begin{aligned} \mathcal {V}_{\text {Geom}} \,=\,\int _0^{r_h} dr \prod _{j=2}^{n/2}\,r^2\,d\Omega _j^2 \,=\,\frac{2}{n-2} \, V. \end{aligned}$$

Thus, the coincidence between the thermodynamical volume and the geometric volume occurs just in four dimensions, whereas in higher dimensions \(\mathcal {V}_{\text {Geom}}\) is smaller than V. The discrepancy between these volumes should not raise any concern at all. For instance, it is known that for rotating black holes this difference also occurs [37]. The nice thing of the solution presented here is that it is a static black hole in which the geometric volume and the thermodynamical volume do not agree, differently from the Schwarzschild–Tangherlini spacetime.

In order to obtain solution (23), we have assumed that the constants \(b_j\) defined by Eq. (22) are all equal. Nevertheless, it is worth pointing out that there are also solutions for the general case in which the constants are distinct. As an example, it will be shown a solution in six dimensions, \(n=6\). Assuming that \(a_2=a_3=a\), where a is non-zero, it follows that we can always redefine the origin of the coordinate r in such a way that \(b_3 = - b_2 = b\), so that

$$\begin{aligned} R_2(r) \,=\,a\,r \,-\,b \quad \text {and} \quad R_3(r) \,=\,a\,r \,+\,b. \end{aligned}$$
(27)

In such a case, one can check that a solution is provided by the ansatz (18) along with the electromagnetic field (20), where the functions \(F_1\), \(F_j\) and f are fixed by the integration process. Indeed, imposing Maxwell’s equation (1) we find that

$$\begin{aligned} F_1(r) \,=\,\sqrt{\frac{8}{3}}\, \frac{q_1}{(b^2 \,-\,a^2 \,r^2)^2} \,, \end{aligned}$$
(28)

where \(q_1\) is an integration constant that represents the electric charge. Then, imposing relations \(\mathcal {E}^t_{\;\;t} + \mathcal {E}^{\theta _2}_{\;\;\theta _2} = 0\), \(\mathcal {E}^t_{\;\;t} + \mathcal {E}^{\theta _3}_{\;\;\theta _3} = 0\) and \(\mathcal {E}^{\theta _2}_{\;\;\theta _2} + \mathcal {E}^{\theta _3}_{\;\;\theta _3} = 0\), which are immediate consequences of Einstein’s equation, we end up with the following relations respectively

$$\begin{aligned} F_2(r) =\,&\frac{b-a r}{b + a r} \bigg [ -8 \Lambda \left( b^2-a^2 r^2\right) ^2 + 6 a^2 r^2 + 4 a b r + 6 b^2 \nonumber \\&- 2 a^2 \left( 9 a^2 r^2+2 a b r-3 b^2\right) f \nonumber \\&+ 2 a (b^2-a^2 r^2) (5 a r+b) f^{\prime } -\left( b^2-a^2 r^2\right) ^2 f^{\prime \prime } \bigg ]^{1/2} \,,\nonumber \\ F_3(r) =\,&\frac{b+a r}{b - a r} \bigg [ -8 \Lambda \left( b^2-a^2 r^2\right) ^2 + 6 a^2 r^2 - 4 a b r + 6 b^2 \nonumber \\&+ 2 a^2 \left( -9 a^2 r^2+2 a b r+3 b^2\right) f \nonumber \\&+ 2 a (b^2-a^2 r^2) (5 a r - b) f^{\prime } -\left( b^2-a^2 r^2\right) ^2 f^{\prime \prime } \bigg ]^{1/2} \,,\nonumber \\ f(r) =\,&\frac{1}{15 \left( b^2-a^2 r^2\right) } \,\bigg \{ C_1 -\frac{1}{2} C_2 \log \left( \frac{a r+b}{b-ar} \right) \nonumber \\&+ \frac{4 b^2}{a^2} \left( 4 b^2 \Lambda -5\right) \log \left( b^2-a^2 r^2\right) +\frac{5 q_1^2}{4 a^2 b^4} \log ^2\left( \frac{a r+b}{b-a r}\right) \nonumber \\&- \frac{1}{a^2 b^4 \left( b^2-a^2 r^2\right) } \bigg [ 14 a^2 b^8 \Lambda r^2+a^2 b^6 r^2 \left( 5-17 a^2 \Lambda r^2\right) \nonumber \\&-5 b^2 q_1^2 + a^4 b^4 r^4 \left( 3 a^2 \Lambda r^2-5\right) \bigg ] \bigg \} \end{aligned}$$
(29)

with \(C_1\) and \(C_2\) being integration constants. The remaining components of Einstein’s equation are immediately satisfied once Eqs. (28) and (29) are assumed to hold. Computing the Ricci scalar and the Kretschmann scalar we see that they diverge at \(r \,=\,\pm b/a\), indicating that this spacetime has two singularities. Besides the latter solution, it has been checked that solutions also exist in six and eight dimensions for the general case in which the constants \(a_j\) and \(b_j\) are different from each other, contrasting with the assumption made in Eq. (27). Nevertheless, the expressions for the functions \(F_j\) and f turn out to be quite messy in such a broad case, so that they will not be presented here.

4 Generalized Nariai spacetimes in higher order curvature theories

It is widely believed that Einstein’s theory of gravitation is just the low-energy limit of a more complete (quantum) theory that is valid up to energies of the order of the Planck scale, as exemplified by String theory [39]. In this scheme, the Einstein–Hilbert Lagrangian density is supplemented by terms of higher order in the curvature. Since these modified theories of gravitation have equations of motion that differ from Einstein’s equation, it turns out that, generally, vacuum solutions of the latter are not vacuum solutions of the former theories. Nevertheless, there are special metrics called universal that, apart from a possible rescalement by a constant multiplicative factor, are vacuum solutions in any gravitational theory arising from an action that is invariant under diffeomorphisms [40]. For instance, the maximally symmetric spacetimes, and the Kerr-Schild metrics that are in the Kundt class are examples of universal solutions [41]. These universal spacetimes are of great physical interest because they can be used as consistent vacuum states for the quantum theory of gravity, irrespective of its form. Given the relevance of these issues, in this section we shall investigate the generalized charged Nariai solution in a much broader theory of gravity than general relativity, and we will show that the uncharged generalized (anti-)Nariai solution presented here is a universal metric.

The Einstein–Hilbert Lagrangian density is just a linear function of the Ricci scalar \(\mathcal {R}\). The simplest way to modify it is to consider that the gravitational Lagrangian density is a more general function of the Ricci scalar, \(f(\mathcal {R})\), where f could be chosen on phenomenological and experimental grounds. So, the action of the system in such a case is given by

$$\begin{aligned} \mathcal {S} \,=\,\int \sqrt{-g} \left[ f(\mathcal {R}) \,+\,\mathcal {L}_{\text {matter}}\right] , \end{aligned}$$

where \(\mathcal {L}_{\text {matter}}\) is the Lagrangian density of the matter content. Performing the variation of this action with respect to the metric, we end up with the following field equation

$$\begin{aligned}&f^{\prime }(\mathcal {R}) \, \mathcal {R}_{ab} - \left[ \nabla _a\,\nabla _b - g_{ab}\,\nabla _c\nabla ^c \right] f^{\prime }(\mathcal {R}) \nonumber \\&\qquad - \frac{1}{2}\,f(\mathcal {R})\,g_{ab} = \mathcal {T}_{ab}, \end{aligned}$$
(30)

with \(\mathcal {T}_{ab}\) denoting the energy-momentum tensor of the matter, which is obtained from the following relation:

$$\begin{aligned} \mathcal {T}_{ab} \,=\,\frac{-1}{\sqrt{-g}}\, \frac{ \delta \mathcal {S}_{\text {matter}}}{\delta g^{ab}} . \end{aligned}$$

It is worth pointing out that the field equation (30) generally involves derivatives of metric that are higher than second order. Thus, it is natural to imagine that this feature would lead to a theory whose initial value problem is not well-posed. However, it can be proved that \(f(\mathcal {R})\) theory is equivalent to Einstein’s gravity coupled non-minimally with a scalar field [42], so that the Cauchy problem is well established, at least in four dimensions [43].

Another interesting way to systematically add higher order curvature terms to the Einstein–Hilbert Lagrangian is provided by the so-called Lovelock gravity [44], whose gravitational Lagrangian density is given by

$$\begin{aligned} \mathcal {L}_{\text {Lov.}} \,=\,\sum _{k=0}^{\frac{n-2}{2}} \, \frac{\alpha _k}{2^k} \,\delta ^{c_1d_1\ldots c_k d_k}_{a_1b_1\ldots a_k b_k}\, \mathcal {R}^{a_1b_1}_{\phantom {a_1a_1}c_1d_1} \ldots \mathcal {R}^{a_{k}b_{k}}_{\phantom {a_1a_2}c_{k}d_{k}} \,, \end{aligned}$$

where \(\alpha _k\) are constants that should be fixed by phenomenology. In n dimensions, this sum could continue up to values \(k\ge n/2\). However, these extra terms would not contribute to the field equations, since they are purely topological. The great feature that defines Lovelock gravity is that the above Lagrangian is the most general one that provides a field equation that is of second order on the derivatives of the metric [44]. The term \(k=0\) in the above sum represents the cosmological constant part of the Lagrangian, while the term \(k=1\) gives the Ricci scalar. Thus, the term \(k=2\) is the first “non-conventional” term and is called the Gauss–Bonnet (GB) Lagrangian density, whose expression is given by:

$$\begin{aligned} \mathcal {L}_{GB}\,=\,\left( \, \mathcal {R}^2 - 4 \,\mathcal {R}^{ab}\mathcal {R}_{ab} + \mathcal {R}^{abcd}\mathcal {R}_{abcd}\, \right) . \end{aligned}$$

In four dimensions, this term is purely topological and, hence, does not contribute to the gravitational field equation. Nevertheless, in higher dimensions it changes Einstein’s field equation. It has recently been proved that Lovelock gravity can be seen as general relativity coupled with skew-symmetric auxiliary fields [45], but these form fields are non-dynamical [46].

In order to cover a great amount of gravitational theories, here we shall consider that the gravitational Lagrangian density is given by a sum of the term \(f(\mathcal {R})\) with the Gauss–Bonnet term. Considering that the gravitational field is interacting with an electromagnetic field through a minimal coupling, we end up with the following final action

$$\begin{aligned} \mathcal {S} \,=\,\int \sqrt{-g} \left[ f(\mathcal {R}) \,+\,\alpha \, \mathcal {L}_{GB} \,-\,\frac{1}{4}\,\mathcal {F}^{cd}\mathcal {F}_{cd} \right] \,, \end{aligned}$$
(31)

where f is an arbitrary function and \(\alpha \) is some arbitrary constant. The field equations in such a case are given by \(\nabla ^a \mathcal {F}_{ab}\,=\,0\) along with:

$$\begin{aligned} f^{\prime }(\mathcal {R}) \, \mathcal {R}_{ab} - \left[ \nabla _a\,\nabla _b - g_{ab}\,\nabla _c\nabla ^c \right] f^{\prime }(\mathcal {R}) - \frac{1}{2}\,f(\mathcal {R})\,g_{ab} \,+\,\alpha \, \mathcal {H}_{ab} \,=\,\mathcal {T}_{ab}, \end{aligned}$$
(32)

where the tensor \(\mathcal {H}_{ab}\) is defined by

$$\begin{aligned} \mathcal {H}_{ab} \,=\,2 \left( \mathcal {R} \mathcal {R}_{ab} - 2 \mathcal {R}_{ac}\mathcal {R}^{c}_{\phantom {c}b} - 2 \mathcal {R}_{acbd}\mathcal {R}^{cd} + \mathcal {R}_{acde}\mathcal {R}_{b}^{\phantom {b}cde} \right) \,-\,\frac{1}{2}\,g_{ab}\, \mathcal {L}_{GB}, \end{aligned}$$

and the electromagnetic energy-momentum tensor is given by

$$\begin{aligned} \mathcal {T}_{ab} \,=\,\frac{1}{2}\,\mathcal {F}_a^{\phantom {a}c}\mathcal {F}_{bc} - \frac{1}{8}\,g_{ab}\,\mathcal {F}^{cd}\mathcal {F}_{cd}. \end{aligned}$$

We shall integrate these field equations starting with the following ansatz for the metric and for the electromagnetic field respectively:

$$\begin{aligned} ds^2= & {} R_1^2\left[ - S_{\epsilon _1}(x)^2\,dt^2 + dx^2 \right] + \sum _{j=2}^{n/2}\,R_j^2 \, d\tilde{\Omega }_{\epsilon _j}^{2}, \\ \varvec{\mathcal {F}}= & {} q_1 R_1^2 \, S_{\epsilon _1}(x) \, dt\wedge dx + \sum _{j=2}^{n/2} q_j R_j^2\, S_{\epsilon _j}(\theta _j)\, d\phi _j\wedge d\theta _j, \end{aligned}$$

where \(R_1\) and \(R_j\) are constants, the functions \(S_{\epsilon }\) have been defined in Eq. (11) and the line elements \(d\tilde{\Omega }_{\epsilon }^2\) are the ones presented in Eq. (12). Plugging such fields into the equation of motion for the electromagnetic field, \(\nabla ^a \mathcal {F}_{ab}\,=\,0\), and into the field equation for the gravitational field, Eq. (32), lead us to the conclusion that these fields are a solution to such equations of motion provided that the electric charge \(q_1\) and the magnetic charges \(q_j\) are respectively given by

$$\begin{aligned} q_1= & {} \sqrt{- \frac{4}{n-4} \, f( {\scriptstyle 2/\tilde{R}_0^2}) + \left[ \frac{4\, }{(n-4)\tilde{R}_0^2 } - \frac{2 \epsilon _1}{R_1^2} \right] \, f^{\prime }( {\scriptstyle 2/\tilde{R}_0^2}) + \left( \frac{1 }{\tilde{R}_0^2 } - \frac{\epsilon _1}{R_1^2} \right) \frac{8\,\alpha \,\epsilon _1 }{R_1^2} } , \\ q_j= & {} \sqrt{ \, \frac{4}{n-4} \, f( {\scriptstyle 2/\tilde{R}_0^2}) - \left[ \frac{4\, }{(n-4)\tilde{R}_0^2 } - \frac{2 \epsilon _j}{R_j^2} \right] \, f^{\prime }( {\scriptstyle 2/\tilde{R}_0^2}) - \left( \frac{1 }{\tilde{R}_0^2 } - \frac{\epsilon _j}{R_j^2} \right) \frac{8\,\alpha \,\epsilon _j }{R_j^2} } , \end{aligned}$$

where \(\tilde{R}_0\) was defined in Eq. (16). In particular, note that these expressions reduce to the ones presented in Eqs. (14) and (15) when \(\alpha \) vanishes and \(f(\mathcal {R}) = \mathcal {R} - (n-2)\Lambda \). At this point, it is pertinent to mention that the entropy of horizons in theories of gravity with Lagrangian densities possessing higher order curvature terms is not just one quarter of the area [47, 48], so that Eq. (9) is not valid in the context of this section. Indeed, the total entropy will be the sum of a term arising from the Gauss–Bonnet part of the Lagrangian, which is essentially the integral of the Ricci scalar along the horizon [47], plus a term arising from the f(R) part of the Lagrangian, which is essentially the integral of \(f^{\prime }(R)\) along the Horizon [49]. Since the expression for the entropy is not particularly illuminating, we will omit it here.

In the particular case of vanishing electromagnetic field, in which \(q_1=0\) and \(q_j=0\), the gravitational field equation imposes that the radii \(R_1\) and \(R_j\) must be all equal to each other as well as the parameters \(\epsilon _1\) and \(\epsilon _j\) must all coincide. In such a case, the only free parameters are \(R_1\) and \(\epsilon _1\), and the metric is given by

$$\begin{aligned} ds^2&= R_1^2\left[ - S_{\epsilon _1}(x)^2\, dt^2 + dx^2 + \sum _{j=2}^{n/2} \left( d\theta _j^2 + S_{\epsilon _1}(\theta _j)^2 d\phi _j^2 \right) \right] \end{aligned}$$
(33)

Irrespective of the parameters \(R_1\) and \(\epsilon _1\), it turns out that the above metric is such that the left hand side of the field equation (32) is equal to the metric times a constant multiplicative factor. This means that, given some \(R_1\) and \(\epsilon _1\), we can always choose the value of the cosmological constant in such a way that the field equation is satisfied. Actually, the same holds for any gravitational theory, not only for the ones covered by the action (31). Indeed, since the spacetime (33) is the direct product of n / 2 metrics of two-dimensional maximally symmetric spaces possessing the same Ricci scalar, it is a universal spacetime, as recently proved in Ref. [50]. The proof goes as follows. The Riemann tensor of this spacetime is the “sum” of the Riemann tensors associated to each these 2-spaces. More precisely, the Riemann tensor is given by:

$$\begin{aligned} \mathcal {R}_{abcd} = \mathcal {R}_{\varvec{1}\,abcd} + \sum _{j=2}^{n/2} \mathcal {R}_{\varvec{j}\,abcd} , \end{aligned}$$

where

$$\begin{aligned} \left. \begin{array}{ll} \mathcal {R}^{\phantom {\varvec{1}}ab}_{\varvec{1}\phantom {ab}cd} \,=\,- 4\,\epsilon _1 R_1^{-2} \,\, \varvec{e}_1^{\;[a}\tilde{\varvec{e}}_1^{\;b]}\varvec{e}_{1\,[c}\tilde{\varvec{e}}_{1\,d]}, \\ \mathcal {R}^{\phantom {\varvec{j}}ab}_{\varvec{j}\phantom {ab}cd} \,=\,4\,\epsilon _1 R_1^{-2} \,\, \varvec{e}_j^{\;[a}\tilde{\varvec{e}}_j^{\;b]}\varvec{e}_{j\,[c}\tilde{\varvec{e}}_{j\,d]}, \end{array} \right. \end{aligned}$$

where the Lorentz frame (17) has been used. Thus, any symmetric tensor of rank two constructed from contractions of the curvature tensor is a sum of the analog contractions on the Riemann tensors of the 2-spaces. For example,

$$\begin{aligned} \mathcal {R}_{acde}\mathcal {R}_{b}^{\phantom {b}cde} = \mathcal {R}_{\varvec{1}\,acde} \mathcal {R}_{\varvec{1}\,b}^{\phantom {\varvec{1}\,b}cde} + \sum _{j=2}^{n/2} \mathcal {R}_{\varvec{j}\,acde} \mathcal {R}_{\varvec{j}\,b}^{\phantom {\varvec{j}\,b}cde}. \end{aligned}$$

But, if a space is maximally symmetric, any symmetric tensor of rank two built from contractions of its Riemann tensor must be proportional to its metric. Thus, a rank two symmetric tensor constructed from contractions of the curvature of the whole spacetime (33) is a linear combination of the metrics of the 2-spaces. But, since these 2-spaces all have the same Ricci scalar, the coefficients in front of each of the two-dimensional metrics are coincident, so that this linear combination is proportional to the metric of the whole spacetime (33). This proves that the uncharged generalized (anti-)Nariai solution is a universal spacetime [40, 50].

5 Conclusions and perspectives

In this article we have obtained higher-dimensional generalizations of the Nariai, anti-Nariai, Bertotti–Robinson and Plabański–Hacyan spacetimes that are made from the direct product of several 2-spaces of constant curvature. In n dimensions, these solutions admit n / 2 electromagnetic charges, one being electric and the rest being magnetic. These charges generate an uniform electromagnetic field throughout the spacetime. Since in four dimensions the Nariai solution can be obtained from the Schwarzschild-de Sitter spacetime in the limit that the black hole horizon and the cosmological horizon have the same temperature, we have searched for higher-dimensional black holes whose limits of thermodynamical equilibrium converge to the generalized Nariai solutions presented here. We have also seen that similar configurations of metric and electromagnetic fields provide solutions for more general theories of gravity, the only difference being the expressions for the electromagnetic charges.

One interesting feature of the generalized Nariai solutions and their associated black holes presented here is that they possess magnetic charge, while the usual higher-dimensional generalization of the Nariai metric [21, 22] and the Schwarzschild–Tangherlini black hole [32] are not magnetically charged. Therefore, it would be interesting to study the physics of the solutions obtained here. Particularly, one can seek for a rotating version of the black hole solution given by Eqs. (23), (24). Another nice feature of the solutions (13) is that the radii \(R_j\) can be arbitrarily chosen. In particular, one can set \(R_3\), \(R_4\), \(\ldots \) \(R_{\frac{n-2}{2}}\) much smaller than \(R_2\) and study gravitational waves and other physical phenomena in such scenario. The point being that in the latter case only four dimensions of the spacetime are accessible through low energy excitations, which is of relevance for theories and models that assume that our universe have tiny curled extra dimensions.