1 Background

The Einstein’s general relativity (EGR) is a non-renormalizable theory; however, it is believed that a renormalizable theory [1] can be constructed if one makes the higher derivative corrections in it. Therefore, it can be highly motivated to consider higher-order gravity theories. Such higher-order gravities are providing a useful way for the investigation of universe acceleration without using the inclusion of dark energy. Among these theories, one is the well-known Lovelock theory of gravity (LTG) [2]. This theory contains dimensionally continued Euler characteristics, and the EGR can be recovered from it in four dimensions. It is the unique modified theory that retains the second-order character of the equation of motion. Thus, it is a ghost-free theory at a linear level. It has been proven that among others, the second-order Lovelock term is also relevant in the low energy limit of the string theory [3, 4]. This indicates that the LTG may form the high energy generalization for the classical gravity. The arbitrariness for the choice of coupling coefficients in the Lovelock action produces difficulties in the determination of the explicit solution. Therefore, Bañados, Teitelboim and Zanelli introduced a suitable choice for these Lovelock coefficients, which enables us to obtain the explicit solution. Based upon this choice, the new theory known as dimensionally continued gravity (DCG) [5] has been developed. Vacuum and charged black hole solutions in this theory have been found in Refs. [5,6,7]. Thermodynamic properties and stability analysis of these dimensionally continued black holes were also studied in Refs. [5,6,7,8,9,10,11,12].

Since the Lovelock action contains the nonlinear terms of curvature invariants, therefore, it looks more natural to take the nonlinear sources in the matter sector. When one wants the electromagnetic field as a source of gravitational field, then it is much motivating to coupled nonlinear electrodynamics (NLED) with Lovelock gravity. The idea of NLED is important because the linear Maxwell electrodynamics cannot explain the electromagnetic phenomenon very well. In 1936, Heisenberg and Euler formulated a model of NLED for the description of quantum electrodynamics [13]. Similarly, Born and Infeld also formulated a new nonlinear theory of electrodynamics in which the self-energy of electrons gives a finite value. This model is known as Born–Infeld (BI) electrodynamics [14]. Later, it was also shown that this model can be reemerged in string theory as an effective action describing the abelian vector field coupled to a virtual open Boson string [15, 16]. BI formalism is also very useful in studying dark energy, holographic superconductors and holographic entanglement entropy [17,18,19]. Note that unlike Maxwell’s theory, the electric field and potential corresponding to the charged particle are finite in this model. Therefore, it would be very motivating if one coupled BI electrodynamics with gravity theory and investigates the black holes. The first solution in this context was first derived by Hoffmann in Ref. [20]. It has also been shown that this solution is free of curvature singularity at \(r=0\). In addition to this, the different static black hole solutions with or without cosmological constant in the presence of BI electromagnetic field sources are derived in Refs. [21,22,23,24,25,26,27]. Thermodynamic and physical properties of BI black holes are also explored in Refs. [28,29,30,31]. There also exist several other models of NLED other than the BI models, for example the models introduced in Refs. [32,33,34,35,36]. In the framework of these models, different static black holes and their physical properties are studied in Refs. [10, 37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70]. Recently, the thermodynamic and physical properties corresponding to NLED black holes of DCG were also studied [71, 72]. In addition to spherically symmetric solutions, the rotating charged Gauss–Bonnet black brane solutions have also been obtained in Ref. [73]. Furthermore, dilatonic black holes with NLED are investigated in Refs. [74, 75]. Recently, charged black holes surrounded by dark fluid [76] and with quintessence in a string-cloud background [77] have also been studied.

Investigations related to no-hair theorems have both similarly long history and active present. These famous theorems disallow the existence of asymptotically flat black holes of EGR in the presence of conformal scalar field [78, 79]. When cosmological constant is zero, the conformal hairy black holes in four spacetime dimensions can be found, but the scalar field appears to be infinite at the event horizon [80]. It has been shown that the higher-dimensional generalization to these black holes does not exist [81]. However, in the presence of cosmological constant, both the three- and four-dimensional conformal hairy black holes with the scalar field analytic on the event horizon are determined in Refs. [82, 83]. However, until recently higher-dimensional black holes in this regard were not determined when no-go results were reported [84]. Recently, the new gravity coupled to conformal scalar field has been developed in Refs. [85, 86]. The action function for this theory can be written as

$$\begin{aligned} I_S=\int d^dx\sqrt{-g}\sum _{p=0}^{n-1}\bigg (b_p\phi ^{d-4p}\delta ^{\mu _1\ldots \mu _{2p}}_{\nu _1\ldots \nu _{2p}}S^{\nu _1\nu _2}_{\mu _1\mu _2}\ldots S^{\nu _{2p-1}\nu {2p}}_{\mu _{2p-1}\mu {2p}}\bigg ), \end{aligned}$$
(1)

where \(\delta ^{\mu _1\ldots \mu _{2p}}_{\nu _1\ldots \nu _{2p}}\) denotes the generalized Kronecker delta, while

$$\begin{aligned} \begin{aligned} S^{\gamma \alpha }_{\mu \nu }&=\phi ^2R^{\gamma \alpha }_{\mu \nu }-2\delta ^{[\gamma }_{[\mu } \delta ^{\alpha ]}_{\nu ]}\nabla _{\rho }\phi \nabla ^{\rho }\phi -4\phi \delta ^{[\gamma }_{[\mu }\nabla _{\nu ]}\nabla ^{\alpha ]}\phi \\&\quad +\, 8\delta ^{[\gamma }_{[\mu }\nabla _{\nu ]}\phi \nabla ^{\alpha ]}\phi . \end{aligned} \end{aligned}$$
(2)

This is the most general form of the action describing the ghost-free theory. It is important to note that the LTG coupled to the conformal scalar field is also free of ghosts as the equations of motion for the metric and scalar field are still second order. In four dimensions or when \(p=1\), action (1) describes the conformal scalar field gravity with the potential \({\mathcal {V}}(\phi )=\frac{\lambda }{4!}\phi ^4\) and non-minimal coupling term \((-1/12)R\phi ^2\) [86]. Solutions representing higher-dimensional hairy black holes were derived in Refs. [86,87,88,89,90]. These black holes are considered as the first ones for \(d>4\) spacetime dimensions. It has been shown that the hairy black holes are more thermodynamically stable and physical [87, 88]. The stability analysis of the hairy charged black holes in the Einstein–Maxwell theory has also been performed by employing the radial perturbations [91, 92]. By using the similar approach, the stability analysis of Einstein–Gauss–Bonnet black holes has been investigated in Ref. [93]. In addition to this, the linear stability of black holes in quadratic gravity is discussed in Ref. [94]. The thermodynamic stability and thermal phase transitions of the hairy black holes in Born–Infeld–Lovelock gravity are studied in Ref. [95]. Similarly, the magnetized hairy black holes of DCG and their thermodynamics are also studied in Ref. [72]. Therefore, in this work I am also studying the magnetized hairy black holes of DCG coupled to double-logarithmic electrodynamics. Black holes are considered as one of the most fascinating objects, which exhibit many interesting physical consequences. Bekenstein and Hawking showed that the entropy of black hole is proportional to the horizon area, and its temperature is given by the surface gravity evaluated on the event horizon [96,97,98,99,100]. In 1980s, Hawking and Page showed that there can be possible phase transitions between AdS Schwarzschild black hole and thermal AdS space [101]. The AdS/CFT correspondence says that Hawking–Page transition appeared as the gravitational dual for the confinement/deconfinement phase transition [102,103,104,105]. Thus, due to the importance of thermodynamical aspects in black holes, I have also calculated the exact expressions for thermodynamic quantities associated with the obtained hairy black holes in this paper.

The plan of the paper is as follows: In Sect. 2, I give the basic formulations of dimensionally continued gravity and double-logarithmic electrodynamics. I obtain the field equations in this setup and derive the new magnetized hairy solution. In Sect. 3, I present the different thermodynamic quantities in terms of the event horizon and magnetic monopole charge. The generalized first law and Smarr’s formula have also been constructed. Section 4 is devoted to the investigation of magnetized hairy black holes in general Lovelock gravity. Finally, I present a brief conclusion of the paper in Sect. 5.

2 Magnetized hairy dimensionally continued black holes

The action describing the Lovelock gravity coupled to conformal scalar field and double-logarithmic NLED is given by:

$$\begin{aligned} \begin{aligned} I&=\frac{1}{16\pi G}\int d^dx\sqrt{-g}\bigg [\sum _{p=0}^{n-1}\frac{1}{2^p}\delta ^{\mu _1\ldots \mu _{2p}}_{\nu _1\ldots \nu _{2p}}\bigg (a_p R^{\nu _1\nu _2}_{\mu _1\mu _2}\ldots R^{\nu _{2p-1}\nu _{2p}}_{\mu _{2p-1}\mu _{2p}}+16\pi G b_p\phi ^{d-4p}\\&\quad \times \, S^{\nu _1\nu _2}_{\mu _1\mu _2}\ldots S^{\nu _{2p-1}\nu _{2p}}_{\mu _{2p-1}\mu _{2p}}\bigg )+4\pi GL_M(P)\bigg ], \end{aligned} \end{aligned}$$
(3)

where coefficients \(a_p\) and \(b_p\) are arbitrary constants. Also, G is the Newtonian constant, \(R^{\alpha \beta }_{\mu \nu }\) are the curvature tensor components and \(S^{\alpha \beta }_{\mu \nu }\) are the components of the fourth rank tensor given by (2). Note that the tensor \(S^{\alpha \beta }_{\mu \nu }\) transforms homogeneously under the conformal transformation defined by \(g_{\mu \nu }\rightarrow \Omega ^2g_{\mu \nu }\), \(\phi \rightarrow \Omega ^{-1}\phi \) when \(S^{\alpha \beta }_{\mu \nu }\rightarrow \Omega ^{-4}S^{\alpha \beta }_{\mu \nu }\). Furthermore, \(L_M(P)\) refers to the Lagrangian density of double-logarithmic electrodynamics and is given as:

$$\begin{aligned} \begin{aligned} L_M(P)&=\frac{1}{2\beta }\bigg [\bigg (1-\sqrt{-2\beta P}\bigg )\log {\bigg (1-\sqrt{-2\beta P}\bigg )}+\bigg (1+\sqrt{-2\beta P}\bigg )\\&\quad \times \log {\bigg (1+\sqrt{-2\beta P}\bigg )}\bigg ], \end{aligned} \end{aligned}$$
(4)

where \(P=F_{\mu \nu }F^{\mu \nu }=2\big (\mathbf{B }^2-\mathbf{E }^2\big )\) in which \(\mathbf{E }\) represents the electric field, \(\mathbf{B }\) is the magnetic field and \(F_{\mu \nu }\) denotes the Maxwell tensor, which in terms of gauge potential \(A_{\mu }\) can be defined as \(F_{\mu \nu }=\partial _{\mu }A_{\nu }-\partial _{\nu }A_{\mu }\). The action function (3) describes dimensionally continued gravity when the coefficients \(a_p\) are defined as [5, 8]

$$\begin{aligned} a_p=\left( \begin{array}{c} n-1 \\ p \end{array} \right) \frac{(d-2p-1)!}{(d-2)!l^{2(n-p-1)}}. \end{aligned}$$
(5)

The equations of motion corresponding to LTG can be obtained from the variation of action (3) with respect to the metric tensor \(g_{\mu \nu }\) as:

$$\begin{aligned} -\sum _{p=0}^{s}\frac{a_p}{2^{p+1}}\delta ^{\nu \lambda _1\ldots \lambda _{2p}}_{\mu \rho _1\ldots \rho _{2p}} R^{\rho _1\rho _2}_{\lambda _1\lambda _2}\ldots R^{\rho _{2p-1}\rho _{2p}}_{\lambda _{2p-1}\lambda _{2p}}=16\pi GT^{(M)\nu }_{\mu }+16\pi GT^{(S)\nu }_{\mu }, \end{aligned}$$
(6)

where the components of matter tensor \(T^{(M)\nu }_{\mu }\) associated with the double-logarithmic electromagnetic field are given by:

$$\begin{aligned} \begin{aligned} T^{(M)}_{\mu \nu }&=\frac{1}{2\beta }\bigg [\bigg (1-\sqrt{-2\beta P}\bigg )\log {\bigg (1-\sqrt{-2\beta P}\bigg )}+\bigg (1+\sqrt{-2\beta P}\bigg )\\&\quad \times \, \log {\bigg (1+\sqrt{-2\beta P}\bigg )}\bigg ]g_{\mu \nu }-\frac{2F_{\mu \lambda }F^{\lambda }_{\nu }}{\sqrt{-2\beta P}}\log {\bigg (\frac{1-\sqrt{-2\beta P}}{1+\sqrt{-2\beta P}}\bigg )}. \end{aligned} \end{aligned}$$
(7)

Similarly, the components \(T^{(S)\nu }_{\mu }\) correspond to the matter tensor of the conformal scalar field and can be obtained as:

$$\begin{aligned} \begin{aligned} T^{(S)\nu }_{\mu }&=\sum _{p=0}^{n-1}\frac{b_p}{2^{p+1}}\phi ^{d-4p} \delta ^{\nu \lambda _1\ldots \lambda _{2p}}_{\mu \rho _1\ldots \rho _{2p}} S^{\rho _1\rho _2}_{\lambda _1\lambda _2}\ldots S^{\rho _{2p-1} \rho _{2p}}_{\lambda _{2p-1}\lambda _{2p}}.\end{aligned} \end{aligned}$$
(8)

The equations of motion for the double-logarithmic electromagnetic field can be obtained from the variation of Eq. (3) with respect to gauge potential \(A_{\mu }\) as

$$\begin{aligned} \begin{aligned} \partial ^{\mu }\bigg [\frac{\sqrt{-g}}{\sqrt{-2\beta P}}\log {\bigg (\frac{1-\sqrt{-2\beta P}}{1+\sqrt{-2\beta P}}\bigg )}F_{\mu \nu }\bigg ]=0. \end{aligned} \end{aligned}$$
(9)

It should be noted that by imposing the limit \(\beta \rightarrow 0\) in the Lagrangian density (4), one can attain the formulations of Maxwell’s theory. Similarly, variation of Eq. (3) with respect to scalar field yields the equations of motion:

$$\begin{aligned} \begin{aligned} \sum _{p=0}^{n-1}\frac{(d-2p)b_p}{2^p}\phi ^{d-4p-1}\delta ^{\lambda _1\ldots \lambda _{2p}}_{\rho _1\ldots \rho _{2p}}S^{\rho _1\rho _2}_{\lambda _1\lambda _2}\ldots S^{\rho _{2p-1}\rho _{2p}}_{\lambda _{2p-1}\lambda _{2p}}=0.\end{aligned} \end{aligned}$$
(10)

It can be noted that Eq. (10) makes the trace of \(T^{(S)\nu }_{\mu }\) equal to zero. Hence, this confirms the conformal coupling of scalar field with gravity. In order to derive the static spherically symmetric solution, it is convenient to consider the general metric ansatz as

$$\begin{aligned} ds^2=-f(r)dt^2+\frac{dr^2}{f(r)}+r^2d\Sigma ^2_{(\alpha )d-2}, \end{aligned}$$
(11)

where \(d\Sigma ^2_{(\alpha )d-2}\) defines the line element of \((d-2)\)-dimensional hyper-surface of constant curvature equal to \((d^2-5d+6)\alpha \) such that \(\alpha \) is a constant and takes the values \(\alpha =0,+1,-1\), associated with flat, spherical and hyperbolic horizon topologies, respectively. The volume of this submanifold is represented by \(\Sigma ^{(\alpha )}_{d-2}\), which for the case of spherical horizon topology becomes \(\Sigma ^{+1}_{d-2}=\frac{2\pi ^{(d-1)/2}}{\Gamma [(d-1)/2]}\). Now, for obtaining a solution which describes the pure magnetized hairy black hole, the choice \(\mathbf{B }\ne 0\) and \(\mathbf{E }=0\) should be taken into account. Due to this assumption, the Maxwell’s invariant can be expressed as \(P=\frac{2Q^2}{r^{2d-4}}\) in which Q represents the magnetic monopole charge. Furthermore, when the scalar field configuration is selected as

$$\begin{aligned} \phi (r)=\frac{N}{r}, \end{aligned}$$
(12)

then the real-valued function \(\phi (r)\) satisfies the scalar field equations (10) if the following equations hold for the parameter N

$$\begin{aligned} \sum _{p=1}^{n-1}pb_p\frac{(d-1)!}{(d-2p-1)!}N^{2-2p}=0, \end{aligned}$$
(13)

and

$$\begin{aligned} \sum _{p=1}^{n-1}b_p\frac{(d-1)!(d^2-d+4p^2)}{(d-2p-1)!}N^{-2p}=0. \end{aligned}$$
(14)

Since there are two equations for the one unknown N. So, this implies that one of the equation is playing the role of constraint on the conformal coupling constants \(b_p\)’s. Thus, by considering the pure double-logarithmic magnetic field along with Eqs. (11)–(14) for the conformal scalar field configuration, one can get the equation of motion (6) as

$$\begin{aligned} \begin{aligned} \frac{d}{dr}\bigg [\sum _{p=0}^{n-1}&\frac{(d-2)!a_pr^{d-1}}{2(d-2p-1)!}\bigg (\frac{\alpha -f(r)}{r^2}\bigg )^p\bigg ]=-\frac{16\pi Gr^{d-2}}{\beta }\log {\bigg (1+\frac{4\beta Q^2}{r^{2d-4}}\bigg )}\\&+\,64\pi G Q\sqrt{\beta }\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r^{d-2}}\bigg )}+16\pi G \sum _{p=0}^{n-1}\frac{b_p(d-2)!N^{d-2p}}{(d-2p-2)!r^2}. \end{aligned} \end{aligned}$$
(15)

Now, by taking the values of coupling coefficients \(a_p\) given in (5), the above equation can be written in the more simplified form as:

$$\begin{aligned} \begin{aligned}&\frac{d}{dr}\bigg [r^{d-1}\bigg (\frac{1}{l^2}+\frac{\alpha -f(r)}{r^2}\bigg )^{n-1}\bigg ]=-\frac{32\pi Gr^{d-2}}{\beta }\log {\bigg (1+\frac{4\beta Q^2}{r^{2d-4}}\bigg )}\\&\quad +\, 128\pi G Q\sqrt{\beta }\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r^{d-2}}\bigg )}+32\pi G \sum _{p=0}^{n-1}\frac{b_p(d-2)!N^{d-2p}}{(d-2p-2)!r^2}.\end{aligned} \end{aligned}$$
(16)

Integration of this equation gives the solution as

$$\begin{aligned} \begin{aligned} f(r)&=\alpha +\frac{r^2}{l^2}-r^2\bigg (\frac{16\pi G M}{\Sigma _{d-2}^{(\alpha )}r^{d-1}}+\frac{\delta _{d,2n-1}}{r^{d-1}}+\frac{32\pi G H}{r^d}-\frac{16\pi G}{\beta (d-2)(d-1)^2}\\&\quad \times \, \log {\bigg (1+\frac{4\beta Q^2}{r^{2d-4}}\bigg )}+\frac{64\pi G Q^2r^{2-d}}{\sqrt{\beta }(d-1)(d-2)(d-3)}\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r^{d-2}}\bigg )}\\&\quad -\, \frac{128\pi d Q^2G}{(d-3)(d-1)^2r^{2d-4}}F_1\bigg [1,\frac{d-3}{2d-4},\frac{3d-7}{2d-4},-\frac{4\beta Q^2}{r^{2d-4}}\bigg ]\bigg )^{\frac{1}{n-1}}, \end{aligned} \end{aligned}$$
(17)

where

$$\begin{aligned} H=\sum _{p=0}^{n-1}b_p\frac{(d-2)!N^{d-2p}}{(d-2p-2)!}. \end{aligned}$$
(18)
Fig. 1
figure 1

f(r) versus r. The parameters are selected as \(Q=10\), \(\delta _{d,2n-1}=5\), \(\beta =0.1\), \(\Sigma _{d-2}=100\), \(l=1\), \(H=1\), \(n=2\), \(d=5\), \(M=10\) (black), \(M=500\) (red) and \(M=1000\) (blue)

The constant of integration M in Eq.(17) is related to the mass of the black hole, and the additive constant \(\delta _{d,2n-1}\) is chosen such that in the limit \(M\rightarrow 0\), the black hole shrinks into a single point. Figure 1 shows the behaviour of the metric function (17) for a suitably chosen value of the parameters Q, \(\beta \) and H. The value of radial coordinate r at which the curve intersects the horizontal axis indicates the position of black hole’s horizon. It is easy to see that by choosing \(b_p=0\) or in the limit \(H\rightarrow 0\), the new class of dimensionally continued topological black holes without scalar hair in the framework of double-logarithmic electrodynamics can be obtained. The black hole solutions of DCG with Maxwell source can be regained in the weak field limit, i.e. when \(\beta \rightarrow 0\). Moreover, the neutral dimensionally continued black holes can be recovered when \(Q=0\) and \(H\rightarrow 0\). It is worthwhile to mention here that the hairy black hole solutions given by (17) are possible only for \(d\ge 5\). Equations (13)–(14) hold in four dimensions only when all the coupling constants \(b_p\)’s are zeros. Hence, we cannot find the hairy black hole solutions in the spacetime dimensions \(d=4\).

The curvature invariants associated with the static ansatz (11) can be defined as:

$$\begin{aligned} \begin{aligned} R(r)&=\bigg [(d-2)(d-3)\bigg (\frac{\alpha -f(r)}{r^2}\bigg ) -\frac{d^2f}{dr^2}-\frac{2(d-2)}{r}\frac{df}{dr}\bigg ], \end{aligned} \end{aligned}$$
(19)

and

$$\begin{aligned} \begin{aligned} K(r)&=\bigg [2(d-2)(d-3)\bigg (\frac{\alpha -f(r)}{r^2}\bigg )^2 -\bigg (\frac{d^2f}{dr^2}\bigg )^2+\frac{2(d-2)}{r^2}\bigg (\frac{df}{dr}\bigg )^2\bigg ]. \end{aligned} \end{aligned}$$
(20)

So, by substituting the obtained solution (17) into above curvature scalars, one can show that both of these invariants are infinite at the origin \(r=0\). This confirms the existence of a true curvature singularity at this point. Hence, the resulting solution represents the magnetized hairy black hole.

3 Thermodynamics of magnetized hairy dimensionally continued black holes

In order to study the thermodynamic properties for black holes, one should need to calculate the basic thermodynamic quantities, for instance Hawking temperature, entropy and heat capacity. The horizons of the black hole can be determined from the roots of \(f(r)=0\). Thus, using this fact the finite mass of the black hole as a function of event horizon \(r_+\) can be found as

$$\begin{aligned} \begin{aligned} M&=\frac{\Sigma _{d-2}}{16\pi G}\bigg [r_+^{d-1}\bigg (\frac{1}{r_+^2}+\frac{1}{l^2}\bigg )^{n-1}-\delta _{d,2n-1}-\frac{16\pi G H(d-2)}{r_+}\\&\quad +\, \frac{128\pi GQ^2d}{(d-3)(d-1)^2r_+^{d-3}}F_1\bigg [1,\frac{d-3}{2d-4},\frac{3d-7}{2d-4},-\frac{4\beta Q^2}{r_+^{2d-4}}\bigg ]+\frac{16\pi G r_+^{d-1}}{\beta (d-2)(d-1)^2} \\&\quad \times \, \log {\bigg (1+\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )}-\frac{64\pi GQ^2r_+}{\sqrt{\beta }(d-1)(d-2)(d-3)}\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r_+^{d-2}}\bigg )}\bigg ]. \end{aligned} \end{aligned}$$
(21)
Fig. 2
figure 2

Mass function M versus \(r_+\). The parameters are selected as \(Q=10\), \(\beta =0.1\), \(\Sigma _{d-2}=100\), \(l=1\), \(H=1\), \(n=2\), \(d=5\) (black), \(n=2\), \(d=6\) (red) and \(n=3\), \(d=7\) (blue)

The behaviour of the mass as a function of horizon radius is shown in Fig. 2. It is shown that for the resulting hairy black holes given by (17), there exist one or more horizons. Those values of \(r_+\) for which the mass is positive indicate the existence of black holes with such horizon radii. However, those values of \(r_+\) at which it is negative do not correspond to the horizons of black holes.

The Hawking temperature [100] can be expressed through the definition of surface gravity \(\kappa _s\) as \(T_H=\kappa _s/2\pi \). Thus, associated with (17), the temperature can be calculated as:

$$\begin{aligned} \begin{aligned} T_{H}&=\frac{r_+}{4\pi }\bigg [-\frac{2}{r_+^2}+\frac{r_+^{2n-3}l^{2n-4}}{(n-1)(r_+^2+l^2)^{n-2}}\bigg (\frac{(d-1)}{r_+}\bigg (\frac{1}{r_+^2}+\frac{1}{l^2}\bigg )^{n-1}+\frac{16\pi GH(d-2)}{r_+^{d+1}}\\&\quad +\, \frac{16\pi G}{\beta (d-1)(d-2)r_+}\log {\bigg (1+\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )}-\frac{128\pi G Q^2(d+1)}{(d-1)^2r_+(r_+^{2d-4}+4\beta Q^2)}\\&\quad -\, \frac{64\pi GQ^2\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r_+^{d-2}}\bigg )}}{\sqrt{\beta }(d-1)(d-2)(d-3)r_+^{d-1}}+\frac{128\pi G Q^3}{(d-1)(d-3)r_+(r_+^{2d-4}+4\beta Q^2)}\bigg )\bigg ].\end{aligned} \end{aligned}$$
(22)
Fig. 3
figure 3

Hawking temperature versus \(r_+\). The parameters are selected as \(Q=10\), \(\beta =0.1\), \(\Sigma _{d-2}=100\), \(l=1\), \(H=1\), \(n=2\), \(d=5\) (black), \(n=2\), \(d=6\) (red) and \(n=3\), \(d=7\) (blue)

The graph of Hawking temperature is plotted in Fig. 3 for different values of dimensionality parameter d. Those values of \(r_+\) at which the temperature is negative describe the region of thermodynamic instability. The point at which the temperature changes sign corresponds to phase transition of type I, and the region in which it is positive implies that the black hole is physical.

The entropy of the dimensionally continued black hole can be computed through Wald’s method [106, 107]. Thus, by employing this method, it can be expressed as:

$$\begin{aligned} S=-2\pi \oint d^{d-2}x\sqrt{\gamma }\frac{\partial L}{\partial R_{abcd}}\epsilon _{ab}\epsilon _{cd}, \end{aligned}$$
(23)

in which L denotes the Lagrangian density of gravitational field, \(\gamma \) is the determinant of the induced metric defined on the horizon and \(\epsilon _{ab}\) represents the binormal to the horizon. Hence, the entropy for the dimensionally continued hairy black hole solution (17) can be obtained as:

$$\begin{aligned} \begin{aligned} S&=\frac{\Sigma _{d-2}}{4G}\sum _{p=1}^{n-1}\frac{pb_p(d-2!)N^{d-2p}}{(d-2p)!}+\frac{(n-1)\Sigma _{d-2}r_+^d}{4G(d-2n+2)}\bigg (\frac{1}{r_+^2}+\frac{1}{l^2}\bigg )^{n-1}\\&\quad \times \, F_1\bigg [1,\frac{d}{2},\frac{d-2n+4}{2},\frac{-r_+^2}{l^2}\bigg ]. \end{aligned} \end{aligned}$$
(24)

The extended first law in this scenario takes the form:

$$\begin{aligned} \begin{aligned} dM&=T_HdS+\Phi _QdQ+W_{\beta }d\beta +\sum _{p=0}^{n-1}B^{(p)}db_p, \end{aligned} \end{aligned}$$
(25)

where the conjugate quantity

$$\begin{aligned} \begin{aligned} \Phi _Q&=\frac{8\pi r_+\Sigma _{d-2}}{(d-3)(d-2)(d-1)^2}\bigg [\frac{(d^2-2d-3+Qd-Q)r_+^{d-2}}{(r_+^{2d-4}+4\beta Q^2)}-\frac{(d-1)}{\sqrt{\beta }}\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r_+^{d-2}}\bigg )} \\&\quad +\, \frac{d(d-1)}{r_+^{d-2}}F_1\bigg (1,\frac{d-3}{2d-4},\frac{3d-7}{2d-4},-\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )\bigg ], \end{aligned} \end{aligned}$$
(26)

is the magnetic potential associated with magnetic charge Q. Similarly, the conjugate quantity relative to the parameter \(\beta \) can be computed as:

$$\begin{aligned} \begin{aligned} W_{\beta }&=\frac{\Sigma _{d-2}}{(d-2)(d-1)^2r_+\beta ^2}\bigg [\frac{2Q^2\sqrt{\beta }r_+^2}{(d-3)} \bigg ((d-1)\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r_+^{d-2}}\bigg )} \\&\quad +\, \frac{2\sqrt{\beta }r_+^{d-2}(d^2-2d-3+dQ+Q)}{r_+^{2d-4}+4\beta Q^2}\bigg )-r_+^d\log {\bigg (1+\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )}\\&\quad -\, \frac{4dQ^2\beta }{r_+^{2d-4}}F_1\bigg (1,\frac{3-d}{4-2d},\frac{7-3d}{4-2d},-\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )\bigg ], \end{aligned} \end{aligned}$$
(27)

while the conjugate quantities \(B^{(p)}\) associated with the coupling constants \(b_p\) can be calculated as:

$$\begin{aligned} \begin{aligned} B^{(p)}=-\frac{4\Sigma _{d-2}}{r_+}\sum _{p=0}^{n-1}\frac{(d-2)!N^{d-2p}}{(d-2p-2)!}. \end{aligned} \end{aligned}$$
(28)

The generalized Smarr’s relation associated with the above thermodynamic and conjugate quantities can be followed as:

$$\begin{aligned} \begin{aligned} (d-3)M&=(d-2)T_HS+(d-3)\Phi _QQ+2\beta W_{\beta }d\beta +(d-2)\sum _{p=0}^{n-1}B^{(p)}b_p. \end{aligned} \end{aligned}$$
(29)

Since it is clear from Eqs. (13) and (14) that \(b_p's\) are not all independent. Thus, it should be emphasized that the variations of coupling constant \(b_p\) in the first law (25) are all not independent.

The heat capacity is defined by the relation:

$$\begin{aligned} C_Q=T_{H}(r_h)\frac{dS}{dT_H}|_{Q}. \end{aligned}$$
(30)

Differentiation of Eq. (19) with respect to \(r_+\) gives

$$\begin{aligned} \frac{\partial T_H}{\partial r_+}&=\frac{1}{4\pi }\bigg [\Xi _1(r_+)+\Xi _2(r_+)+\Xi _3(r_+)+\Xi _4(r_+)+\frac{2}{l^2}\bigg ], \end{aligned}$$
(31)
$$\begin{aligned} \Xi _1(r_+)&=\frac{2(d-1)(2-n)r_+^2}{(n-1)}-2(d-1)l^2+\frac{(2n-3)(d-1)}{(n-1)(r_+^2+l^2)}\nonumber \\&\quad +\, \frac{16\pi GH(d-2)l^{2n-4}(r_+^2(1-d)+(2n-3-d)l^2)}{(n-1)r_+^{d-2n+4}(r_+^2+l^2)^{n-1}}, \end{aligned}$$
(32)
$$\begin{aligned} \Xi _2(r_+)&=-\frac{16\pi G l^{2n-4}r_+^{2n-4}(r_+^2+l^2)^{1-n}}{\beta (d-2)(d-1)(n-1)(r_+^{2d-4}+4\beta Q^2)}\bigg [(8d-16)\beta Q^2(r_+^2+l^2)\nonumber \\&\quad -\, (r_+^2+(2n-3)l^2)(r_+^{2d-4}+4\beta Q^2)\log {\bigg (1+\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )}\bigg ], \end{aligned}$$
(33)
$$\begin{aligned} \Xi _3(r_+)&=\frac{64\pi G Q^2l^{2n-4}(r_+^2+l^2)^{1-n}r_+^{2n-d-6}}{(d-3)(d-1)(d-2)(n-1)\sqrt{\beta }(r_+^{2d-4}+4\beta Q^2)}\bigg [\frac{2Q(d-2)\sqrt{\beta }}{r_+^{-d-2}(r_+^2+l^2)^{-1}} \nonumber \\&\quad +\, r_+^4((d-3)r_+^2+(d-2n+1)l^2)(r_+^{2d-4}+4\beta Q^2)\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r_+^{d-2}}\bigg )}\bigg ], \end{aligned}$$
(34)

and

$$\begin{aligned} \begin{aligned} \Xi _4(r_+)&=\frac{128\pi G Q^2l^{2n-4}r_+^{2n-4}(d^2-2d-3-Qd+Q)}{(d-3)(d-1)^2(n-1)(l^2+r_+^2)^{n-1}(r_+^{2d-4}+4\beta Q^2)^2}\bigg [\big ((2d-5)r_+^2\\&\quad +\, l^2(2d-2n-1)\big )r_+^{2d-4}-4\beta Q^2\big (r_+^2+(2n-3)l^2\big )\bigg ]. \end{aligned} \end{aligned}$$
(35)

Hence, by using Eqs. (31)–(35) along with the expressions of entropy and temperature in (30), we can get heat capacity as:

$$\begin{aligned} \begin{aligned} C_Q&=\frac{(n-1)\Sigma _{d-2}(r_+^2+l^2)r_+^{d-2n+1}\chi (r_+)}{4Gl^{2n}(d-2n+2) (d-2n+4)\sqrt{\beta }(n-1)(d-1)(d-2)} \\&\quad \times \, \frac{\sqrt{\beta }(n-1)(d-1)(d-2)(r_+^2+l^2)^{n-2} (\Delta _1+\Delta _3)+16\pi Gr_+^{2n-3}l^{2n-4}\Delta _2}{\bigg (2r_+^{-2} +\Xi _1(r_+)+\Xi _2(r_+)+\Xi _3(r_+)+\Xi _4(r_+)\bigg )}, \end{aligned} \end{aligned}$$
(36)

where

$$\begin{aligned} \Delta _1&=\frac{(d-1)r_+^{2n-3}l^{2n-4}}{(n-1)(r_+^2+l^2)^{n-2}}\bigg [\bigg (\frac{1}{r_+^2}+\frac{1}{l^2}\bigg )^{n-1}+\frac{16\pi G H(d-2)}{(d-1)r_+^d}\bigg ]-\frac{2}{r_+}, \end{aligned}$$
(37)
$$\begin{aligned} \Delta _2&=\frac{1}{\sqrt{\beta }}\log {\bigg (1+\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )}-\frac{4Q^2}{(d-3)r_+^{d-2}}\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r_+^{d-2}}\bigg )}, \end{aligned}$$
(38)
$$\begin{aligned} \Delta _3&=\frac{128\pi G Q^2 l^{2n-4}r_+^{2n-3}(Q(d-1)-(d-3)(d+1)}{(d-3)(d-1)^2(n-1)(r_+^2+l^2)^{n-2}(r_+^{2d-4}+4\beta Q^2)}, \end{aligned}$$
(39)

and

$$\begin{aligned} \begin{aligned} \chi _1(r_+)&=l^2(d-2n+4)\big (r_+^2d+l^2(d-2n+2)\big )F_1\bigg [1,\frac{d}{2},\frac{d-2n+4}{2},-\frac{r_+^2}{l^2}\bigg ]\\&\quad -\, 2d r_+^2(r_+^2+l^2)F_1\bigg [2,1+\frac{d}{2},3-n+\frac{d}{2},-\frac{r_+^2}{l^2}\bigg ].\end{aligned} \end{aligned}$$
(40)
Fig. 4
figure 4

Heat capacity versus \(r_+\). The parameters are selected as \(Q=10\), \(\beta =0.1\), \(\Sigma _{d-2}=100\), \(l=1\), \(H=1\), \(n=2\), \(d=5\) (black), \(n=2\), \(d=6\) (red) and \(n=3\), \(d=7\) (blue)

Fig. 5
figure 5

\(\frac{dT_H}{dr_+}\) versus \(r_+\). The parameters are selected as \(Q=10\), \(\beta =0.1\), \(\Sigma _{d-2}=100\), \(l=1\), \(H=1\), \(n=2\), \(d=5\) (black), \(n=2\), \(d=6\) (red) and \(n=3\), \(d=7\) (blue)

The heat capacity is significant as it plays a crucial role in local thermodynamic stability of black holes. Figure 4 shows the plot of heat capacity \(C_Q\) dependent on \(r_+\) for suitably chosen values of the parameters Q, \(\beta \), H and d. Note that the region where it is positive (negative) indicates the local thermal stability (instability) of the black hole. The values of \(r_+\) for which it changes sign represent the phase transitions of type I. However, those values of \(r_+\) at which it is infinite indicate the existence of phase transitions of type II. Note that these transitions can also be analysed from Fig. 5 because the points at which \(dT_H/dr_+\) vanishes imply that the heat capacity is divergent at these points. Hence, those values at which the curve of \(dT_H/dr_+\) crossed the horizontal axis correspond to the phase transitions of type II.

4 Magnetized hairy black holes of general Lovelock-scalar gravity

The Lovelock polynomial that provides the metric function for magnetized hairy black holes in general LTG can be obtained from (15) as

$$\begin{aligned} \begin{aligned}&\sum _{p=0}^{n-1}\frac{(d-1)!a_p}{(d-2p-1)!}\bigg (\frac{\alpha -f(r)}{r^2}\bigg )^p=\frac{16\pi G M(d-1)}{(d-2)\Sigma ^{(\alpha )}_{d-2}r^{d-1}}+\frac{16\pi G(d-1)H}{r^d}\\&\quad +\, \frac{64Q \pi Gr^{2-d}}{\sqrt{\beta }(d-2)(d-3)}\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r^{d-2}}\bigg )}-\frac{16\pi G}{\beta (d-2)(d-1)}\log {\bigg (1+\frac{4\beta Q^2}{r^{2d-4}}\bigg )}\\&\quad -\, \frac{128Q^2d\pi G}{(d-3)(d-1)r^{2d-4}} F_1\bigg [1,\frac{d-3}{2d-4},\frac{3d-7}{2d-4},-\frac{4\beta Q^2}{r^{2d-4}}\bigg ]. \end{aligned} \end{aligned}$$
(41)

Note that we have used the scalar configuration in form (12) along with the assumption of pure magnetic field. The expression for finite mass of the hairy black hole associated with the above polynomial takes the form:

$$\begin{aligned} \begin{aligned} M&=\frac{\Sigma ^{(\alpha )}_{d-2}}{16\pi G (d-1)}\bigg [\sum _{p=0}^{n-1}\frac{(d-1)!a_p\alpha ^p}{(d-2p-1)!r_+^{-(d-2p-1)}}-\frac{16\pi G(d-1)(d-2)H}{r_+} \\&\quad +\, \frac{16\pi Gr_+^{d-1}}{\beta (d-2)(d-1)}\times \log {\bigg (1+\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )}-\frac{64\pi GQ^2r_+\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r_+^{d-2}}\bigg )}}{\sqrt{\beta }(d-2)(d-3)}\\&\quad +\, \frac{128\pi GQ^2d}{(d-3)(d-1)r_+^{d-3}}F_1\bigg (1,\frac{d-3}{2d-4},\frac{3d-7}{2d-4},-\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )\bigg ]. \end{aligned} \end{aligned}$$
(42)

Similarly, the Hawking temperature can be computed as:

$$\begin{aligned} \begin{aligned} T_{H}(r_+)&=\frac{1}{4\pi Z(r_+)}\bigg [\sum _{p=0}^{n-1}\frac{(d-1)!a_p\alpha ^p}{(d-2p-2)!r_+^{2p+1}}+\frac{16\pi G H(d-1)(d-2)}{r_+^{d+1}}\\&\quad +\, \frac{16\pi G}{(d-2)r_+\beta }\log {\bigg (1+\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )}-\frac{64\pi G Q^2\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r_+^{d-2}}\bigg )}}{\sqrt{\beta }(d-2)(d-3)r_+^{d-1}} \\&\quad +\, \frac{128\pi G Q^2\big (Q(d-1)-(d+1)(d-3)\big )}{(d-1)(d-3)r_+(r_+^{2d-4}+4\beta Q^2)}\bigg ], \end{aligned} \end{aligned}$$
(43)

where \(Z(r_h)\) is defined by:

$$\begin{aligned} Z(r_h)=\sum _{p=0}^{n-1}\frac{pa_p\alpha ^{p-1}(d-1)!}{(d-2p-1)!r_+^{2p}}. \end{aligned}$$
(44)

Again by employing Wald’s method, it is straightforward to obtain entropy as

$$\begin{aligned} S=\frac{(d-2)\Sigma ^{(\alpha )}_{d-2}}{4G}\sum _{p=1}^{n-1}p\alpha ^{p-1} \bigg (\frac{(d-2p-1)!a_pr_+^{d-2p}}{(d-2)!}+\frac{b_p(d-3)!N^{d-2p}}{(d-2p)!}\bigg ). . \end{aligned}$$
(45)

Hence, by using Eqs. (43)–(45), one can obtain the heat capacity in the form as follows:

$$\begin{aligned} C_Q&=\frac{\Sigma _{d-2}^{(\alpha )}\sum _{p=1}^{n-1}p\alpha ^{p-1}(d-2p)!a_pr_+^{d-2p-1}}{4G(d-1)!\bigg (A(r_+)+\frac{16\pi G H(d-1)(d-2)}{r_+^{d+1}}+\sum _{p=0}^{n-1}\frac{(d-1)!a_p\alpha ^p}{(d-2p-2)!r_+^{2p+1}}\bigg )^{-1}} \nonumber \\&\quad \times \, \bigg [\bigg (\frac{dA}{dr_+}-\sum _{p=0}^{n-1}\frac{(d-1)!a_p\alpha ^p(2p+1)}{(d-2p-2)!r_+^{2p+2}}-\frac{16\pi G H(d^2-1)(d-2)}{r_+^{d+2}}\bigg )\nonumber \\ {}&\quad -\, \frac{dZ/dr_+}{Z(r_+)}\bigg (A(r_+)+\frac{16\pi G H(d-1)(d-2)}{r_+^{d+1}}+\sum _{p=0}^{n-1}\frac{(d-1)!a_p\alpha ^p}{(d-2p-2)!r_+^{2p+1}}\bigg )\bigg ]^{-1}, \end{aligned}$$
(46)
$$\begin{aligned} A(r_+)&=\frac{16\pi G}{(d-2)r_+\beta }\log {\bigg (1+\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )}+\frac{128\pi G Q^2\big (Q(d-1)-(d+1)(d-3)\big )}{(d-1)(d-3)r_+(r_+^{2d-4}+4\beta Q^2)}\nonumber \\&\quad -\, \frac{64\pi G Q^2}{\sqrt{\beta }(d-2)(d-3)r_+^{d-1}}\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r_+^{d-2}}\bigg )}, \end{aligned}$$
(47)

and

$$\begin{aligned} \frac{dA}{dr_+}&=\frac{256\pi G Q^2}{(d-3)(d-1)r_+^2(r_+^{2d-4}+4\beta Q^2)^2}\bigg (\big (d^3-(Q+4)d^2+(3Q+2)d\nonumber \\&\quad +\, (3-2Q)\big ) r_+^{2d-4}+4(d-3)\beta Q^2\bigg )+\frac{64\pi G (d-1)Q^2}{\sqrt{\beta }(d-2)(d-3)r_+^{d}}\arctan {\bigg (\frac{2Q\sqrt{\beta }}{r_+^{d-2}}\bigg )} \nonumber \\&\quad -\, \frac{16\pi G}{\beta r_+^2(d-2)}\log {\bigg (1+\frac{4\beta Q^2}{r_+^{2d-4}}\bigg )}. \end{aligned}$$
(48)

5 Summary and conclusion

Lovelock gravity in the presence of nonlinear electrodynamics is a very interesting area of research, which inspired us to study black holes in this context. Therefore, in this paper, I started my work with the dimensionally continued gravity in the presence of double-logarithmic electrodynamics and conformal scalar field. Then, I construct the associated equations of motion and derive the new solution (17) for the magnetized hairy black holes. I mainly focused on the magnetized black holes because the pure electric or dyonic cases in double-logarithmic electrodynamics cannot admit the metric function in a closed form. The thermodynamic properties of these hairy black holes are discussed, and the exact expressions for finite mass, Hawking temperature and heat capacity are calculated. The satisfaction of generalized first law of thermodynamics has also been verified. The thermodynamic quantities are plotted in different dimensions, and their behaviours are discussed. The regions corresponding to local thermodynamic stability can be identified from these plots. The plots of heat capacity and Hawking temperature show that thermal phase transitions of black holes are also possible. The phase transitions of type I correspond to those values of \(r_+\) at which the specific heat changes sign. On the other side, the type II phase transitions of black holes correspond to the singularities of heat capacity. Finally, the hairy black holes in Lovelock gravity are briefly investigated within the chosen model of double-logarithmic electrodynamics.

It is worth noting that when \(\beta \rightarrow 0\) both the solution (17) and the polynomial (41) will describe the Maxwellian charged hairy black holes. The black holes without scalar hair can also be recovered by simply putting either \(H=0\) or \(b_p's=0\) in (17) and (41). However, by choosing Q equal to zero, the metric function for neutral black holes can be obtained.

It would be very interesting to study Hawking radiations, thermal fluctuations and grey body factors for the hairy black holes obtained in this paper. In addition to this, one can also use the model of double-logarithmic electrodynamics for the analysis of accelerated expansion of the universe. Similarly, the new black hole solutions of quartic and quintic quasi-topological gravities can also be obtained in the presence of double-logarithmic electrodynamics.