### Clique number in the sparse regime

Theorems 1 and 2 allow us to say that for constant *p* and \(d \gg \log ^7 n\), the clique number of a random geometric graph grows similarly to that of an Erdős–Rényi graph, which is \(2\log _{1/p} n - 2\log _{1/p}\log _{1/p} n + O(1)\). We will show that in the sparse regime, under some conditions on *p* and *d*, there is no clique of size 4 in *G*(*n*, *p*, *d*) a. s. Let us also remark that the condition \(d \gg \log ^7 n\) is necessary only for the dense regime, as Theorems 1 and 2 do not impose any restrictions on *d*.

To apply Theorems 1 and 2, we need a lemma that establishes the growth rate of \(t_{p,d}\), which is crucial for asymptotic analysis in the sparse regime. Since *p* is the normalized surface area of a spherical cap of angle \(\arccos t_{p,d}\) (an example for a circle is given in Fig. 1 below), we learn from convex geometry that (see Brieden et al. 2001):

$$\begin{aligned} \frac{1}{6t_{p,d}\sqrt{d}} (1-t^2_{p,d})^{\frac{d-1}{2}} \le p \le \frac{1}{2t_{p,d}\sqrt{d}} (1-t^2_{p,d})^{\frac{d-1}{2}}. \end{aligned}$$

(1)

The following more explicit bound on \(t_{p,d}\) has been derived in Bubeck et al. (2016).

###
**Lemma 1**

*There exists a universal constant* \(C>0\) *such that for all* \(0 < p \le 1/2\), *we have that*

$$\begin{aligned} \min \left( C^{-1}(1/2 - p) \sqrt{\frac{\log (1/p)}{d}}; \frac{1}{2} \right) \le t_{p,d} \le C \sqrt{\frac{\log (1/p)}{d}}. \end{aligned}$$

Before we present our main result on the clique number, let us prove a lemma that will be useful later.

###
**Lemma 2**

*Let* \(d \ge \log ^{1+\epsilon }n\) *for some fixed* \(\epsilon > 0\) *and* \(p \ge 1/n^m\) *for some fixed* *m*. *Then for any* \(\gamma > 0\), *there exists* \(n_0\) *such that for* \(n \ge n_0\)

$$\begin{aligned} \frac{e^{-t^2_{p,d} d/2}}{t_{p,d} \sqrt{d}} \le pn^{\gamma }. \end{aligned}$$

###
*Proof*

First of all, let us notice that \(t_{p,d} \ge 0\), that is why

$$\begin{aligned} e^{-t^2_{p,d} d/2} = e^{-t^2_{p,d} (d-1)/2} e^{-t^2_{p,d}/2} \le e^{-t^2_{p,d} (d-1)/2}, \end{aligned}$$

therefore, it is sufficient to derive a bound on \(e^{-t^2_{p,d} (d-1)/2}\). We next show that this quantity might be approximated by \(\frac{1}{t_{p,d}\sqrt{d}}(1-t^2_{p,d})^{\frac{d-1}{2}}\). Indeed,

$$\begin{aligned} \frac{1}{t_{p,d}\sqrt{d}}(1-t^2_{p,d})^{\frac{d-1}{2}} = \frac{1}{t_{p,d}\sqrt{d}} \exp \left\{ \frac{d-1}{2} \log (1-t^2_{p,d}) \right\} , \end{aligned}$$

and since \(t_{p,d} \rightarrow 0\), we can approximate the logarithm by Taylor series with \(\displaystyle k = \left\lceil 1/\epsilon \right\rceil + 1\) terms:

$$\begin{aligned} \log (1-t^2_{p,d}) = -t^2_{p,d} - \sum _{i = 2}^k \frac{t^{2i}_{p,d}}{i} + O\left( t^{2k+2}_{p,d}\right) . \end{aligned}$$

That implies:

$$\begin{aligned} \frac{1}{t_{p,d}\sqrt{d}}(1-t^2_{p,d})^{\frac{d-1}{2}} = \frac{1}{t_{p,d}\sqrt{d}} \exp \left\{ -\frac{d-1}{2} \left( t^2_{p,d} + \sum _{i = 2}^k \frac{t^{2i}_{p,d}}{i} + O\left( t^{2k+2}_{p,d} \right) \right) \right\} . \end{aligned}$$

The first term in the sum under the exponent function gives exactly what we needed. Therefore, it can be expressed as follows:

$$\begin{aligned} \frac{e^{-t^2_{p,d} (d-1)/2}}{t_{p,d}\sqrt{d}} = \frac{1}{t_{p,d}\sqrt{d}}(1-t^2_{p,d})^{\frac{d-1}{2}} \exp \left( \frac{d-1}{2} O\left( t^{2k+2}_{p,d}\right) \right) \prod _{i = 2}^{k} \exp \left( \frac{(d-1)t^{2i}_{p,d}}{2i} \right) . \end{aligned}$$

(2)

The first term in the right-hand side product, accordingly to (1), is at most proportional to *p*:

$$\begin{aligned} \frac{1}{t_{p,d}\sqrt{d}}(1-t^2_{p,d})^{\frac{d-1}{2}} \le 6p. \end{aligned}$$

Further, as we learn from Lemma 1, there exists such a constant \(C > 0\) that

$$\begin{aligned} t^{2k+2}_{p,d} \frac{d-1}{2} \le C\frac{\log ^{k+1}(1/p)}{d^k} \le Cm^{k+1} \frac{\log ^{k+1}n}{\log ^{k+\epsilon k} n} = Cm^{k+1}\log ^{1-\epsilon k} n \end{aligned}$$

for large enough *n*. The right-hand side converges to 0 as \(n\rightarrow \infty\) since \(1-\epsilon k < 0\) due to the choice of parameter *k*. That allows us to bound the second term by a constant larger than 1, for instance:

$$\begin{aligned} \exp \left( \frac{d-1}{2} O\left( t^{2k+2}_{p,d}\right) \right) \le 2. \end{aligned}$$

Let us consider the last term of (2). As in the above argumentation,

$$\begin{aligned} t^{2i}_{p,d} \frac{d-1}{2i} \le Cm^i\frac{\log ^i n}{\log ^{i+\epsilon i}n} = Cm^i\log ^{1-\epsilon i}n. \end{aligned}$$

But \(\exp \left( Cm^k\log ^{1-\epsilon i}n\right)\) grows slower than \(n^{\gamma /k}\) for any \(\gamma > 0\), which means that for large *n* the third term of (2) is at most \(n^{\gamma }\):

$$\begin{aligned} \prod _{i = 2}^{k} \exp \left( \frac{(d-1)t^{2i}_{p,d}}{2i} \right) \le \left( n^{\gamma /k} \right) ^{k-1} \le \frac{n^{\gamma }}{12}. \end{aligned}$$

A final combination of these three bounds finishes the proof:

$$\begin{aligned} \frac{1}{t_{p,d}\sqrt{d}} \exp \left\{ \frac{d-1}{2} \log (1-t^2_{p,d}) \right\} \le 12p \cdot \frac{n^{\gamma }}{12} \le pn^{\gamma }. \end{aligned}$$

\(\square\)

Now we can present our result that states that *G*(*n*, *p*, *d*) does not contain cliques of size 4 almost surely. Let us remind that \(N_k(n,p,d)\) denotes the number of *k*-cliques in *G*(*n*, *p*, *d*).

###
**Theorem 4**

*Suppose that* \(\displaystyle k \ge 4, n^{-m} \le p \le n^{-2/3 - \gamma }\) *with some* \(m>0\) *and* \(\gamma > 0\) *and* \(d \gg \log ^{1+\epsilon }n\) *with some* \(\epsilon > 0\). *Then*

$$\begin{aligned} {\mathbb {P}}[N_k(n,p,d) \ge 1] \rightarrow 0, \;\; n\rightarrow \infty . \end{aligned}$$

###
*Proof*

First, let us check that the conditions of Theorem 2 are satisfied with the parameters of our case. It is known that

$$\begin{aligned} \Phi (x) = 1 + e^{-x^2/2}\left( -\frac{1}{\sqrt{2\pi } x} + O\left( \frac{1}{x^3}\right) \right) \text { as } x\rightarrow \infty . \end{aligned}$$

(3)

Thus, in our case

$$\begin{aligned} {\hat{p}} = 1 - \Phi (t_{p,d}\sqrt{d}) = \frac{e^{-(t_{p,d}\sqrt{d})^2/2}}{t_{p,d}\sqrt{2\pi d}}(1 + o(1)) \end{aligned}$$

Therefore, since \(t_{p,d} \sqrt{d} \rightarrow \infty\),

$$\begin{aligned} \beta&= 2\sqrt{\log \frac{4}{{\hat{p}}}} = 2\sqrt{-\log \left( 4\frac{ e^{-t^2_{p,d} d/2} }{t_{p,d}\sqrt{2\pi d}} (1 + o(1))\right) } \\&= 2 \sqrt{(t_{p,d}\sqrt{d})^2/2 + \log (t_{p,d}\sqrt{2\pi d}) - \log 4 + o(1)} \\&= \sqrt{2} \sqrt{(t_{p,d}\sqrt{d})^2 (1 + o(1))} \le 2t_{p,d}\sqrt{d} \le \\&\le 2 C\sqrt{\log (1/p)} \le 2C\sqrt{m} \sqrt{\log n}. \end{aligned}$$

Here we have used the result of Lemma 2. Considering \(d \gg \log ^{1+\epsilon } n\), we obtain that \(\beta \rightarrow 0\) as \(n\rightarrow \infty\), that is why for sufficiently large *n*,

$$\begin{aligned} \beta \sqrt{\frac{k}{d}} < 1. \end{aligned}$$

Now we need to select an appropriate parameter \(\delta _n\). Since \(\alpha = \sqrt{1 - \beta \sqrt{k/d}} \rightarrow 1\) as \(n\rightarrow \infty\), we can take \(\delta _n = \log ^{1/2 - \epsilon /2} n\) for sufficiently large *n*.

It is only left to check the condition

$$\begin{aligned} d > \frac{8(k+1)^2\log \frac{1}{{\tilde{p}}}}{\delta ^2_n} \left( k\log \frac{4}{{\tilde{p}}} + \log \frac{k-1}{2} \right) . \end{aligned}$$

(4)

Indeed, as far as *k* is constant, for *n* large enough

$$\begin{aligned} \frac{8(k+1)^2\log \frac{1}{{\hat{p}}}}{\delta ^2_n} \left( k\log \frac{4}{{\hat{p}}} + \log \frac{k-1}{2} \right)&\le \frac{32k(k+1)^2 \log ^2\frac{1}{{\hat{p}}}}{\log ^{1-\epsilon }n} \\&\le \frac{32m^2 k(k+1)^2 \log ^2 n}{\log ^{1-\epsilon }n} \\&\le 32m^2 k(k+1)^2 \log ^{1+\epsilon } n. \end{aligned}$$

But *d* grows faster than \(\log ^{1+\epsilon } n\), and condition (4) is then satisfied. Thus, it is now possible to apply the bound from Theorem 2.

According to the asymptotic representation of \(\Phi (x)\) and Lemma 2, for sufficiently large *n*,

$$\begin{aligned} 1 - \Phi (\alpha t_{p,d}\sqrt{d} - \delta _n)&\le \frac{C_{\Phi }}{t_{p,d}\sqrt{d}} e^{-(\alpha t_{p,d}\sqrt{d} - \delta _n)^2/2} \\&\le \frac{C_{\Phi }}{t_{p,d}\sqrt{d}} e^{-\alpha ^2 t^2_{p,d}d/2} e^{\alpha t_{p,d} \sqrt{d} \delta _n} e^{-\delta ^2_n} \\&\frac{C_{\Phi }}{t_{p,d}\sqrt{d}} e^{-\left( 1 - \beta \sqrt{k/d} \right) t^2_{p,d}d/2} e^{\alpha t_{p,d} \sqrt{d} \delta _n} \\&\le C_{\Phi } p n^{\gamma /4} e^{\beta \sqrt{kd} t^2_{p,d}/2} e^{\alpha t_{p,d} \sqrt{d} \delta _n}, \end{aligned}$$

with some universal constant \(C_{\Phi } > 0\). Since \(\beta \le 2C \sqrt{m} \sqrt{\log n}\) and \(t_{p,d} \le C\sqrt{\frac{\log (1/p)}{d}}\), we have

$$\begin{aligned} \exp \left( \beta \sqrt{kd} t^2_{p,d}/2 \right)&\le \exp \left( C \sqrt{km} \sqrt{\log n}\, t^2_{p,d} \sqrt{d} \right) \\&\le \exp \left( C^3 \sqrt{km} \frac{\log (1/p)}{\sqrt{d}} \right) \le \\&\le \exp \left( \sqrt{k} C^3 m^{3/2} \frac{\log ^{3/2}n}{\log ^{1/2+\epsilon /2}n} \right) \\&= \exp \left( \sqrt{k} C^3 m^{3/2} \log ^{1-\epsilon /2} n \right) . \end{aligned}$$

The second exponent can be bounded similarly:

$$\begin{aligned} \exp \left( \alpha t_{p,d} \sqrt{d} \delta _n \right)&\le \exp \left( t_{p,d} \sqrt{d} \delta _n \right) \le \exp \left( C\sqrt{m} \log ^{1/2}n \log ^{1/2-\epsilon /2} n \right) \\&= \exp \left( C\sqrt{m} \log ^{1-\epsilon /2} n \right) . \end{aligned}$$

Therefore, for sufficiently large *n*,

$$\begin{aligned} e^{\beta \sqrt{K/d} t^2_{p,d}d/2} e^{\alpha t_{p,d} \sqrt{d} \delta _n} \le \exp \left( (C\sqrt{m} + \sqrt{k} C^3 m^{3/2}) \log ^{1-\epsilon /2} n \right) < n^{\gamma /4}. \end{aligned}$$

Finally, we get that

$$\begin{aligned} 1 - \Phi (\alpha t_{p,d}\sqrt{d} - \delta _n) \le C_{\Phi }pn^{\gamma /2} \le C_{\Phi }n^{-2/3 - \gamma }n^{\gamma /2} = C_{\Phi }n^{-2/3-\gamma /2}. \end{aligned}$$

Let us notice that \(\left( {\begin{array}{c}n\\ k\end{array}}\right) \le \frac{n^k}{k!}\). It is easy to verify that \(k - \left( \frac{2}{3} + \gamma \right) \frac{k(k-1)}{2} < 0\) for \(k \ge 4\) and \(\gamma > 0\). Then for \(k \ge 4\),

$$\begin{aligned} {\mathbb {E}} N_k&\le e^{1/\sqrt{2}} \left( {\begin{array}{c}n\\ k\end{array}}\right) \left( 1 - \Phi (\alpha t_{p,d} \sqrt{d} - \delta _n) \right) ^{\left( {\begin{array}{c}k\\ 2\end{array}}\right) } \\&\le \frac{C_{\Phi }^{\left( {\begin{array}{c}k\\ 2\end{array}}\right) }}{k!} e^{1/\sqrt{2}} n^k n^{-(2/3 + \gamma )\frac{k(k-1)}{2}} \rightarrow 0, \;\; n\rightarrow \infty . \end{aligned}$$

It only remains to mention that

$$\begin{aligned} {\mathbb {P}}(N_k \ge 1) \le \mathbb EN_k \rightarrow 0, \;\; n\rightarrow \infty . \end{aligned}$$

The theorem is proved.

\(\square\)

### Number of triangles in the sparse regime: \(d \gg \log ^3 n\)

As noted in the previous section, in the sparse regime, *G*(*n*, *p*, *d*) does not contain any complete subgraph larger than a triangle. The natural question arises, how many triangles are in *G*(*n*, *p*, *d*). The next two results give some idea of the expected number of triangles. The first result refers to the case \(d \gg \log ^3n\); in this case, the average number of triangles grows as the function \(\theta (n)\) that determines the probability \(p(n) = \theta (n)/n\).

Our first goal is to obtain a more accurate analogue of Lemma 2.

###
**Lemma 3**

*Assume* \(p \ge n^{-m}\) *for some* \(m > 0\) *and* \(d \gg \log ^2 n\). *Then the following inequality holds true:*

$$\begin{aligned} \frac{e^{-t^2_{p,d}d/2}}{p} \le t_{p,d} \sqrt{d} \le \frac{12 e^{-t^2_{p,d}d/2}}{p}. \end{aligned}$$

(5)

###
*Proof*

From (1) we learn that

$$\begin{aligned} \frac{2(1-t^2_{p,d})^{d/2}}{p\sqrt{1-t^2_{p,d}}} = \frac{2(1-t^2_{p,d})^{(d-1)/2}}{p} \le t_{p,d} \sqrt{d} \le \frac{6(1-t^2_{p,d})^{(d-1)/2}}{p} = \frac{6(1-t^2_{p,d})^{d/2}}{p\sqrt{1-t^2_{p,d}}}. \end{aligned}$$

Let us write the Taylor series of \((1-t^2_{p,d})^{d/2}\):

$$\begin{aligned} (1-t^2_{p,d})^{d/2}&= \exp \left( \frac{d}{2} \ln \left( 1-t^2_{p,d} \right) \right) = \exp \left( -\frac{d}{2} \left( t^2_{p,d} + O(t^4_{p,d}) \right) \right) \\&= \exp \left( -\frac{d}{2} t^2_{p,d} \right) \exp \left( O(dt^4_{p,d})\right) . \end{aligned}$$

Lemma 1 and the condition \(d \gg \log ^2n\) guarantee that \(t^4_{p,d} d \rightarrow 0\) as \(n \rightarrow \infty\). This means that for any \(\delta > 0\) and sufficiently large *n*, the quantity \(\exp \left( O(dt^4_{p,d})\right)\) can be bounded as follows:

$$\begin{aligned} 1-\delta \le \exp \left( O(dt^4_{p,d})\right) \le 1+\delta . \end{aligned}$$

The same statement holds true for \(1/\sqrt{1-t^2_{p,d}}\):

$$\begin{aligned} 1-\delta \le \frac{1}{\sqrt{1-t^2_{p,d}}} \le 1+\delta . \end{aligned}$$

Therefore, taking \(\delta < 1 - 1/\sqrt{2}\),

$$\begin{aligned} \frac{e^{-t^2_{p,d}d/2}}{p} \le \frac{2(1-\delta )^2 e^{-t^2_{p,d}d/2}}{p} \le t_{p,d} \sqrt{d} \le \frac{6(1+\delta )^2 e^{-t^2_{p,d}d/2}}{p} \le \frac{12 e^{-t^2_{p,d}d/2}}{p}. \end{aligned}$$

Thus, inequality (5) is proved. \(\square\)

###
**Theorem 5**

*Let us suppose that* \(d \gg \log ^3 n\) *and* \(p = \theta (n)/n\) with \(n^m \le \theta (n) \ll n\) *for some* \(m > 0\). *Then for any* \(0< \epsilon < 1\) *and sufficiently large* *n*, *the expected number of triangles can be bounded as follows:*

$$\begin{aligned} \frac{2}{15(2\pi )^{3/2}}(1-\epsilon ) \theta ^3(n) \le {\mathbb {E}}[N_3(n,p,d)] \le \frac{288}{(2\pi )^{3/2}} e^{1/\sqrt{2}} (1+\epsilon ) \theta (n)^3. \end{aligned}$$

###
*Proof*

The idea of the proof is quite similar to that of Theorem 4, but it uses both Theorems 1 and 2. Besides, we need more accurate asymptotic analysis, as now a rough bound of Lemma 2 is not sufficient for the application of Theorems 1 and 2. We are going to use more precise Lemma 3.

**Upper bound** As previously, we first need to verify the conditions of Theorem 2
. It is obvious that still

$$\begin{aligned} \beta \sqrt{\frac{3}{d}} < 1. \end{aligned}$$

Take \(\delta _n = \frac{\log (1 + \varepsilon /4)}{C\sqrt{m} \sqrt{\log n}}\). Then Theorem 2 holds true for

$$\begin{aligned} d \ge \frac{384\log \frac{1}{{\hat{p}}} \log \frac{4}{{\hat{p}}}}{\delta ^2_n}. \end{aligned}$$

But the right-hand side does not grow faster than \(\log ^3 n\) due to the choice of \(\delta _n\) and the argumentation similar to that of Theorem 4. Consequently, the above condition is satisfied if only \(d \gg \log ^3 n\), and now we can apply Theorem 2.

Let us rewrite the bound from this theorem for \(k = 3\):

$$\begin{aligned} {\mathbb {E}} N_3 \le e^{1/\sqrt{2}} \left( {\begin{array}{c}n\\ 3\end{array}}\right) \left( 1 - \Phi (\alpha t_{p,d}\sqrt{d} - \delta _n) \right) ^3 . \end{aligned}$$

Of course, the most important term here is \(1 - \Phi (\alpha t_{p,d}\sqrt{d} - \delta _n)\). Similar to the proof of the previous theorem one can get (with the asymptotic representation (3)) that

$$\begin{aligned} 1 - \Phi (\alpha t_{p,d}\sqrt{d} - \delta _n) \le \frac{e^{-t^2_{p,d} d/2}}{t_{p,d} \sqrt{2\pi d}} e^{\beta \sqrt{3d} t^2_{p,d}/2} e^{\alpha t_{p,d} \sqrt{d} \delta _n}. \end{aligned}$$

From (5) we learn that

$$\begin{aligned} \frac{e^{-t^2_{p,d} d/2}}{t_{p,d} \sqrt{d}} \le 12p. \end{aligned}$$

Further, since \(d \gg \log ^3 n\) and \(\beta < 2C\sqrt{m}\sqrt{\log n}\) (see the proof of Theorem 4), for sufficiently large *n*,

$$\begin{aligned} \exp \left( \beta \sqrt{3d} t^2_{p,d}\right)&\le \exp \left( \frac{2\sqrt{3}C^3 \sqrt{m} \sqrt{\log n} \log (1/p)}{\sqrt{d}} \right) \\&\le \exp \left( \frac{2\sqrt{3}C^3 m^{3/2} \log ^{3/2} n }{\sqrt{d}} \right) = 1 + o(1), \;\; n\rightarrow \infty . \end{aligned}$$

The second exponent is just a constant for the chosen \(\delta _n\) (here we use the fact that \(\alpha < 1\)):

$$\begin{aligned} \exp \left( \alpha t_{p,d} \sqrt{d} \delta _n \right) \le \exp \left( t_{p,d} \sqrt{d} \delta _n \right) \le \exp \left( \sqrt{Cm} \delta _n \log ^{1/2}n \right) = e^{\log (1+\epsilon /2)} = 1+\epsilon /2. \end{aligned}$$

Putting all together and taking into account that \(\left( {\begin{array}{c}n\\ 3\end{array}}\right) \le \frac{n^3}{6}\),

$$\begin{aligned} {\mathbb {E}} {\left[ N_3(n,p,d) \right] }&\le e^{1/\sqrt{2}} \left( {\begin{array}{c}n\\ 3\end{array}}\right) \left( 1 - \Phi (\alpha t_{p,d}\sqrt{d} - \delta _n) \right) ^3\\&\le \frac{288}{(2\pi )^{3/2}} e^{1/\sqrt{2}} (1+\epsilon /2) (1 + o(1)) n^3 p^3 \\&= \frac{288}{(2\pi )^{3/2}} e^{1/\sqrt{2}} (1+\epsilon ) \theta (n)^3. \end{aligned}$$

**Lower bound** Now we are going to use Theorem 1. First, we need to determine the asymptotic behavior of the function \({\tilde{p}}\):

$$\begin{aligned} {\tilde{p}} = 1 - \Phi (2t_{p,d}\sqrt{d} + 1) = \frac{e^{-2t^2_{p,d}\sqrt{d}}}{2t_{p,d} \sqrt{2\pi d}}(1 + o(1)). \end{aligned}$$

As one can easily see,

$$\begin{aligned} \log \frac{1}{{\tilde{p}}} = \log \left( 2 \sqrt{2\pi d} \, t_{p,d} e^{t^2_{p,d}d}(1+o(1)) \right) = t^2_{p,d}d + \log \left( 2 \sqrt{2\pi d} \, t_{p,d} \right) = 2\log n (1+o(1)). \end{aligned}$$

Then \(\beta = \Theta (\sqrt{\log n})\) and \(\beta \sqrt{3/d} \rightarrow 0\) with \(n\rightarrow \infty\). This implies that \(\alpha = \sqrt{1 - \beta \sqrt{k/d}} \rightarrow 1\) as \(n\rightarrow \infty\). Let us take \(\delta _n = \frac{\log (1 + \epsilon )}{2\alpha C\sqrt{m} \sqrt{\log n}}\). Similar to the previous case, the condition

$$\begin{aligned} d \ge \frac{384\log \frac{1}{{\tilde{p}}} \log \frac{4}{{\tilde{p}}}}{\delta ^2_n} \end{aligned}$$

is satisfied if \(d \gg \log ^3 n\).

Let us remind that the bound of Theorem 1 is written as follows:

$$\begin{aligned} {\mathbb {E}}[N_3(n,p,d)] \ge \frac{4}{5} \left( {\begin{array}{c}n\\ 3\end{array}}\right) \left( 1 - {\tilde{\Phi }}_3(d,p) \right) ^{\left( {\begin{array}{c}3\\ 2\end{array}}\right) }, \end{aligned}$$

where \(\displaystyle {\tilde{\Phi }}_3(d,p) = \Phi \left( \frac{\alpha t_{p,d}\sqrt{d} + \delta _n}{\sqrt{1 - \frac{32 \log (1/{\tilde{p}})}{d}}} \right)\).

Since \(t_{p,d}\sqrt{d} \rightarrow \infty\) and \(\alpha \rightarrow 1\) as \(n \rightarrow \infty\),

$$\begin{aligned} 1-{\tilde{\Phi }}_3(d,p)&= \frac{1}{t_{p,d} \sqrt{2\pi d}} \exp \left\{ -\frac{(\alpha t_{p,d}\sqrt{d} + \delta _n)^2}{1 - \frac{32\log (1/{\tilde{p}})}{d}} \right\} (1+o(1)) \\&\ge \frac{1}{t_{p,d} \sqrt{2\pi d}}\exp \left\{ -(\alpha t_{p,d}\sqrt{d} + \delta _n)^2 \left( 1 + \frac{64 \log (1/{\tilde{p}})}{d}\right) \right\} (1+o(1)). \end{aligned}$$

Here we used a simple inequality \(1/(1-x) < 1 + 2x\) for \(0< x < 1/2\) and the fact that \(\frac{4(K+1)^2 \log (1/{\tilde{p}})}{d} = O(1/\log ^2 n) \rightarrow 0\) as \(n\rightarrow \infty\). By the same reason,

$$\begin{aligned} (\alpha t_{p,d}\sqrt{d} + \delta _n)^2 \frac{4(K+1)^2 \log (1/{\tilde{p}})}{d} = O\left( \frac{1}{\log n}\right) . \end{aligned}$$

Hence,

$$\begin{aligned} \exp \left\{ -(\alpha t_{p,d}\sqrt{d} + \delta _n)^2 \frac{4(K+1)^2 \log (1/{\tilde{p}})}{d} \right\} = 1 + o(1), \;\; n\rightarrow \infty . \end{aligned}$$

Consequently,

$$\begin{aligned}1-{\tilde{\Phi }}_3(d,p) &= \frac{1}{t_{p,d} \sqrt{2\pi d}}\exp \left\{ -(\alpha t_{p,d}\sqrt{d} + \delta _n)^2 \right\} (1+o(1)) \\&= \frac{1}{t_{p,d} \sqrt{2\pi d}}\exp \left\{ -(\alpha ^2 t^2_{p,d} d + 2\alpha t_{p,d} \delta _n \sqrt{d} + \delta _n^2) \right\} (1+o(1)) \\&= \frac{1}{t_{p,d} \sqrt{2\pi d}}\exp \left\{ -\left( 1 + \sqrt{\frac{8K}{d} \log \frac{4}{{\tilde{p}}}}\right) t^2_{p,d} d - 2\alpha t_{p,d} \delta _n \sqrt{d} - \delta _n^2 \right\} (1+o(1)). \end{aligned}$$

The inequality (5) guarantees that

$$\begin{aligned} \frac{e^{-t^2_{p,d}}d}{t_{p,d}\sqrt{d}} \ge p. \end{aligned}$$

Further, similarly to the previous case,

$$\begin{aligned} \exp (-2\alpha t_{p,d} \sqrt{d} \delta _n) \ge \exp (-\log (1+\epsilon /4)) = 1/(1+\epsilon /4) \ge 1- \epsilon /2. \end{aligned}$$

Finally, it is easy to check that \(\delta _n^2 \rightarrow 0\) and \(\sqrt{\frac{8K}{d} \log \frac{4}{{\tilde{p}}}} t^2_{p,d} d \rightarrow 0\) under the condition \(d\gg \log ^3 n\). That is why

$$\begin{aligned} 1-{\tilde{\Phi }}_3(d,p) \ge \frac{p}{\sqrt{2\pi }} (1 - \epsilon /2) (1+o(1)) \ge \frac{p}{\sqrt{2\pi }} (1-\epsilon ). \end{aligned}$$

That leads us to the final bound:

$$\begin{aligned} \mathbb EN_3(n,p,d)&\ge \frac{4}{5} \left( {\begin{array}{c}n\\ 3\end{array}}\right) \left( 1 - {\tilde{\Phi }}_3(d,p) \right) ^3 \ge \frac{2}{15(2\pi )^{3/2}} (1 - \epsilon ) n^3 p^3 \\&= \frac{2}{15(2\pi )^{3/2}} (1 - \epsilon ) \theta ^3(n). \end{aligned}$$

\(\square\)

### Number of triangles in the sparse regime: \(d \ll \log ^3 n\)

So far, the presented results more likely confirm the similarity of random geometric graphs and Erdős–Rényi graphs. However, from Bubeck et al. (2016) one can learn that these graphs are completely different in the sparse regime if \(d \ll \log ^3 n\). This can be easily deduced from the result of Theorem 3. It states that the expected number of triangles of a random geometric graph grows significantly faster (as a polylogarithmic function of *n*) than one of the corresponding Erdős–Rényi graph. It turns out that the bound of Theorem 3 can be improved.

In order to make this improvement, we present some results from convex geometry. First of all, it is known that the surface area \(A_d\) of \((d-1)\)-dimensional sphere \({\mathbb {S}}^{d-1}\) can be calculated as follows (see Blumenson 1960):

$$\begin{aligned} A_d = \frac{2\pi ^{d/2}}{\Gamma (d/2)}. \end{aligned}$$

Now we need a result providing the expression for the surface area of the intersection of two spherical caps in \({\mathbb {R}}^d\). Let us denote by \(A_d(\theta _1, \theta _2, \theta _{\nu })\) the surface area of the intersection of two spherical caps of angles \(\theta _1\) and \(\theta _2\) with the angle \(\theta _{\nu }\) between axes defining these caps. The paper (Lee and Kim 2014) gives the exact formula for this quantity in terms of the regularized incomplete beta function.

###
**Theorem 6**

(Lee and Kim 2011) *Let us suppose that* \(\theta _{\nu } \in [0,\pi /2)\) *and* \(\theta _1, \theta _2 \in [0,\theta _{\nu }]\). *Then*

$$\begin{aligned} A_d(\theta _1, \theta _2, \theta _{\nu })&= \frac{\pi ^{(n-1)/2}}{\Gamma \left( \displaystyle \frac{n-1}{2}\right) } \Biggl \{ \int _{\theta _{min}}^{\theta _2} \sin ^{d-2}\phi \, I_{ 1 - \left( \frac{\tan \theta _{min}}{\tan \phi } \right) ^2} \left( \frac{n-1}{2}, \frac{1}{2} \right) d\phi \\&+ \int _{\theta _{\nu } - \theta _{min}}^{\theta _1} \sin ^{d-2}\phi \, I_{ 1 - \left( \frac{\tan (\theta _{\nu } - \theta _{min})}{\tan \phi } \right) ^2} \left( \frac{n-1}{2}, \frac{1}{2} \right) d\phi \Biggr \} \\&:= J_n^{\theta _{min}, \theta _2} + J_n^{\theta _{\nu } - \theta _{min}, \theta _1}{,} \end{aligned}$$

*where* \(\theta _{min}\) *is defined as follows*

$$\begin{aligned} \theta _{min} = \arctan \left( \frac{\cos \theta _1}{\cos \theta _2 \, \sin \theta _{\nu }} - \frac{1}{\tan \theta _{\nu }} \right) {,} \end{aligned}$$

*and* \(I_x(a,b)\) *stands for the regularized incomplete beta* *function, that is*

$$\begin{aligned} I_x(a,b) = \frac{\mathrm {B}(x,a,b)}{\mathrm {B}(a,b)} = \frac{\int _0^x t^{a-1} (1-t)^{b-1} dt}{\int _0^1 t^{a-1} (1-t)^{b-1} dt}. \end{aligned}$$

###
**Theorem 7**

*Let* \(d \gg \log ^2 n\)*, and assume* \(p = \theta (n)/n\) *with* \(n^m \le \theta (n) \ll n\) *for some* \(m > 0\). *Then there exist constants* \(C_l > 0\) *and* \(C_u > 0\) *such that*

$$\begin{aligned} C_l \theta ^3(n) t^2_{p,d} e^{t^3_{p,d} d} (1+o(1)) \le {\mathbb {E}}[N_3(n,p,d)] \le C_u \theta ^3(n) e^{t^3_{p,d} d} (1+o(1)). \end{aligned}$$

###
*Proof*

**Notation and a general plan of the proof** Let us make some preparations. Denote by \(E_{i,j}\) the event \(\{\langle X_i, X_j \rangle \ge t_{p,d}\}\) and by \(E_{i,j}(x)\) the event \(\{\langle X_i, X_j \rangle = x\}\). In what follows, we condition on the zero probability event \(E_{i,j}(x)\). It should be understood as conditioning on the event \(\{x - \epsilon \le \langle X_i, X_j \rangle \le x + \epsilon \}\) with \(\epsilon \rightarrow 0\). Using this notation, we can rewrite

$$\begin{aligned}{}&{\mathbb {P}}(E_{1,2} E_{1,3} E_{2,3}) = \int _{t_{p,d}}^1 {\mathbb {P}}\bigl (E_{2,3} E_{1,3} | E_{1,2}(x) \bigr ) f_d(x) \nonumber \\&= \int _{t_{p,d}}^{2t_{p,d}} {\mathbb {P}}\bigl (E_{2,3} E_{1,3} | E_{1,2}(x) \bigr ) f_d(x) dx + \int _{2t_{p,d}}^1 {\mathbb {P}}\bigl (E_{2,3} E_{1,3} | E_{1,2}(x) \bigr ) f_d(x) \bigr ) dx \nonumber \\&:= T_1 + T_2 , \end{aligned}$$

(6)

where \(f_d(x)\) is the density of a coordinate of a uniform random point on \({\mathbb {S}}^{d-1}\) (see Bubeck et al. 2016), that is

$$\begin{aligned} f_d(x) = \frac{\Gamma (d/2)}{\Gamma ((d-1)/2)\sqrt{\pi }}(1-x^2)^{(d-3)/2}, \;\; x\in [-1,1]. \end{aligned}$$

Using the fact that

$$\begin{aligned} \Gamma (d)\sqrt{d} /100 \le \Gamma (d+1/2) \le 2\sqrt{d} \Gamma (d), \end{aligned}$$

(7)

we can present \(f_d(x)\) as follows:

$$\begin{aligned} f_d(x) = C_f(d)\sqrt{d} (1-x^2)^{(d-3)/2}, \;\; x \in [-1,1]. \end{aligned}$$

(8)

Here \(C_f(d)\) denotes some function of *d* with \(1/100 \le C_f(d) \le \sqrt{2}\).

Here is a general outline of the proof. We treat the terms \(T_1\) and \(T_2\) separately and start with \(T_1\). The probability \(P\bigl (E_{2,3} E_{1,3} | E_{1,2}(x) \bigr )\) can be expressed with the normalized surface area of the intersection of two spherical caps. First, we need to bound this quantity. After that, using the representation (8), we will calculate \(T_1\) in terms of the CDF of the standard normal distribution and will estimate its asymptotic behavior. As for \(T_2\), it will be enough to show that \(T_2 = o(T_1)\) as \(n\rightarrow \infty\).

**Estimation of term** \(T_1\). As was mentioned above, we start with \(T_1\). It will be more handful to write it in the following form:

$$\begin{aligned} T_1&= \int _{t_{p,d}}^{2t_{p,d}} {\mathbb {P}}\bigl (E_{2,3} E_{1,3} | E_{1,2}(x) \bigr ) f_d(x) dx = \\&= t_{p,d} \int _1^2 {\mathbb {P}}\bigl (E_{2,3} E_{1,3} | E_{1,2}(\alpha t_{p,d}) \bigr ) f_d(\alpha t_{p,d}) d\alpha . \end{aligned}$$

Conditioning on \(E_{1,2}(\alpha t_{p,d})\), the probability \({\mathbb {P}}\bigl (E_{2,3} E_{1,3} | E_{1,2}(\alpha t_{p,d})\bigr )\) is just the normalized surface area of the intersection of two caps of angle \(\arccos (t_{p,d})\) (and \(\arccos (\alpha t_{p,d})\) is the angle between the axes of these caps).

$$\begin{aligned} {\tilde{p}}(\alpha )&:= P\bigl (E_{2,3} E_{1,3} | E_{1,2}(\alpha t_{p,d})\bigr ) = \nonumber \\&= \frac{A_d(\arccos (t_{p,d}), \arccos (t_{p,d}), \arccos (\alpha t_{p,d}))}{A_d} = \nonumber \\&= \frac{\Gamma \left( \frac{d}{2} \right) }{2\pi ^{d/2}} \left( J_d^{\theta _{min}, \arccos (t_{p,d})} + J_d^{\arccos (\alpha t_{p,d}) - \theta _{min},\arccos (t_{p,d})}\right) {,} \end{aligned}$$

(9)

where \(J_d^{a,b}\) is defined in Theorem 6, and

$$\begin{aligned} \theta _{min} = \arctan \left( \frac{1}{\sin (\arccos (\alpha t_{p,d}))} - \frac{1}{\tan (\arccos (\alpha t_{p,d}))} \right) = \arctan \left( \sqrt{\frac{1-\alpha t_{p,d}}{1+\alpha t_{p,d}}} \right) . \end{aligned}$$

Because both caps are of the same angle, the parts in the right-hand side of (9) are equal. Therefore, recalling the definition of \(J_d^{\theta _{min}, \arccos (t_{p,d})}\),

$$\begin{aligned} {\tilde{p}}(\alpha )&= \frac{\Gamma \left( \frac{d}{2} \right) }{\pi ^{d/2}} J_d^{\theta _{min}, \arccos (t_{p,d})} \\&= \frac{\Gamma \left( \frac{d}{2} \right) \pi ^{(d-1)/2}}{\pi ^{d/2} \Gamma \left( \frac{d-1}{2} \right) } \int _{\theta _{min}}^{\arccos (t_{p,d})} \sin ^{d-2} \phi \, I_{1 - \left( \frac{\tan \theta _{min}}{\tan \phi } \right) ^2} \left( \frac{d-2}{2}, \frac{1}{2} \right) d\phi . \end{aligned}$$

Let us make a change of variables: \(\sin ^2 \phi = z\). Using this change and the expression for \(\theta _{min}\), we obtain

$$\begin{aligned} {\tilde{p}}(\alpha ) = \frac{\Gamma \left( \frac{d}{2} \right) \pi ^{(d-1)/2}}{2\pi ^{d/2} \Gamma \left( \frac{d-1}{2} \right) } \int _{\frac{1-\alpha t_{p,d}}{2}}^{1-t^2_{p,d}} z^{(d-3)/2} (1-z)^{-1/2} I_{1 - \frac{1-\alpha t_{p,d}}{1+\alpha t_{p,d}}\cdot \frac{1-z}{z}} \left( \frac{d-2}{2}, \frac{1}{2} \right) dz. \end{aligned}$$

Considering the definition of a regularized beta function and the formula \(\Gamma (d+1) = d\Gamma (d)\), we have

$$\begin{aligned} {\tilde{p}}(\alpha ) = \frac{d}{2\pi } \int _{\frac{1-\alpha t_{p,d}}{2}}^{1-t^2_{p,d}} z^{(d-3)/2} (1-z)^{-1/2} \left( \int _0^{1 - \frac{1-\alpha t_{p,d}}{1+\alpha t_{p,d}}\cdot \frac{1-z}{z}} y^{d/2-2} (1-y)^{-1/2} dy \right) dz. \end{aligned}$$

Next, we need a simple double bound on the incomplete beta function \(I_u(a,1/2)\):

$$\begin{aligned} \frac{u^{a+1}}{a+1}\le \int _0^u t^a (1-t)^{-1/2} dt \le \frac{u^{a+1}}{(a+1)\sqrt{1-u}}{,} \end{aligned}$$

which can be established by estimation of \((1-t)^{-1/2}\) and subsequent explicit integration. That is why

$$\begin{aligned}{}&\frac{1}{\pi } \int _{\frac{1-\alpha t_{p,d}}{2}}^{1-t^2_{p,d}} z^{(d-3)/2} (1-z)^{-1/2} \left( 1 - \frac{1-\alpha t_{p,d}}{1+\alpha t_{p,d}}\cdot \frac{1-z}{z} \right) ^{d/2-1} dz \le {\tilde{p}}(\alpha ) \\&\le \frac{2}{\pi } \int _{\frac{1-\alpha t_{p,d}}{2}}^{1-t^2_{p,d}} z^{(d-3)/2} (1-z)^{-1/2} \left( \frac{1-\alpha t_{p,d}}{1+\alpha t_{p,d}}\cdot \frac{1-z}{z} \right) ^{-1/2} \left( 1 - \frac{1-\alpha t_{p,d}}{1+\alpha t_{p,d}}\cdot \frac{1-z}{z} \right) ^{d/2-1} dz. \end{aligned}$$

Here we used the fact that \(1 \le d/(d-2) \le 2\) for \(d \ge 4\). We can transform:

$$\begin{aligned} 1 - \frac{1-\alpha t_{p,d}}{1+\alpha t_{p,d}}\cdot \frac{1-z}{z} = \frac{2z - 1 + \alpha t_{p,d}}{(1+\alpha t_{p,d})z}, \end{aligned}$$

which gives us the following estimation:

$$\begin{aligned}{}&\frac{1}{2\pi } \int _{\frac{1-\alpha t_{p,d}}{2}}^{1-t^2_{p,d}} \frac{1}{\sqrt{z(1-z)}} \left( \frac{2z - 1 + \alpha t_{p,d}}{1+\alpha t_{p,d}}\right) ^{d/2-1} dz \le {\tilde{p}}(\alpha ) \\&\le \frac{1}{\pi } \sqrt{\frac{1+\alpha t_{p,d}}{1-\alpha t_{p,d}}} \int _{\frac{1-\alpha t_{p,d}}{2}}^{1-t^2_{p,d}} \frac{1}{1-z} \left( \frac{2z - 1 + \alpha t_{p,d}}{1+\alpha t_{p,d}}\right) ^{d/2-1} dz \end{aligned}$$

It is easy to check that \(\displaystyle \frac{1}{\sqrt{z(1-z)}}\) has a minimum value 1/2 for \(z \in [0, 1)\), and \(\displaystyle \frac{1}{1-z}\) is increasing in *z* for \(z > 0\). Therefore,

$$\begin{aligned}{}&\frac{1}{2\pi } \int _{\frac{1-\alpha t_{p,d}}{2}}^{1-t^2_{p,d}} \left( \frac{2z - 1 + \alpha t_{p,d}}{1+\alpha t_{p,d}}\right) ^{d/2-1} dz \le {\tilde{p}}(\alpha ) \\&\le \frac{2}{\pi t^2_{p,d}} \sqrt{\frac{1+\alpha t_{p,d}}{1-\alpha t_{p,d}}} \int _{\frac{1-\alpha t_{p,d}}{2}}^{1-t^2_{p,d}} \left( \frac{2z - 1 + \alpha t_{p,d}}{1+\alpha t_{p,d}}\right) ^{d/2-1} dz. \end{aligned}$$

Now we can explicitly compute the integral:

$$\begin{aligned} \int _{\frac{1-\alpha t_{p,d}}{2}}^{1-t^2_{p,d}} \left( \frac{2z - 1 + \alpha t_{p,d}}{1+\alpha t_{p,d}}\right) ^{d/2-1} dz = \frac{1+\alpha t_{p,d}}{d} \left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{d/2}, \end{aligned}$$

which implies the final bounds on \({\tilde{p}}(\alpha )\):

$$\begin{aligned} \frac{1+\alpha t_{p,d}}{2\pi d} \left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{d/2} \le {\tilde{p}}(\alpha ) \le \frac{2(1+\alpha t_{p,d})^{3/2}}{\pi d t^2_{p,d} \sqrt{1-\alpha t_{p,d}}} \left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{d/2}. \end{aligned}$$

This means that \(T_1\) can be estimated as follows:

$$\begin{aligned} \frac{t_{p,d}}{2\pi d} \int _1^2 (1+\alpha t_{p,d}) \left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{d/2} f_d(\alpha t_{p,d}) d\alpha \le T_1 \nonumber \\ \le \frac{2}{\pi d t_{p,d}} \int _1^2 \frac{(1+\alpha t_{p,d})^{3/2}}{\sqrt{1-\alpha t_{p,d}}} \left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{d/2} f_d(\alpha t_{p,d}) d\alpha . \end{aligned}$$

(10)

Let us recall (8) and rewrite the ‘essential’ part of previous inequalities.

$$\begin{aligned}{}&\left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{d/2} f_d(\alpha t_{p,d}) \nonumber \\&= C_f(d) \sqrt{d} \left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{3/2} \left( (1-\alpha ^2 t^2_{p,d}) \left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) \right)
^{(d-3)/2} \nonumber \\&= C_f(d) \sqrt{d} \left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{3/2} \left( 1 - (2 + \alpha ^2)t^2_{p,d} + 2\alpha t^3_{p,d} \right) ^{(d-3)/2} \nonumber \\&= C_f(d) \sqrt{d} \left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{3/2} \frac{\left( 1 - (2 + \alpha ^2)t^2_{p,d} + 2\alpha t^3_{p,d} \right) ^{(d-1)/2} }{1 - (2 + \alpha ^2)t^2_{p,d} + 2\alpha t^3_{p,d}} . \end{aligned}$$

(11)

Of course, we are most interested in the term \(\left( 1 - (2 + \alpha ^2)t^2_{p,d} + 2\alpha t^3_{p,d} \right) ^{(d-1)/2}\), which can be rewritten in the following form:

$$\begin{aligned} \left( 1 - (2 + \alpha ^2))t^2_{p,d} + 2\alpha t^3_{p,d} \right) ^{(d-1)/2} = \exp \left\{ \frac{d-1}{2} \log \left( 1 - (2 + \alpha ^2)t^2_{p,d} + 2\alpha t^3_{p,d} \right) \right\} . \end{aligned}$$

Since \(t_{p,d} \rightarrow 0\) as \(n\rightarrow \infty\), one can use Taylor series for logarithm:

$$\begin{aligned}{}&\log \left( 1 - (2 + \alpha ^2)t^2_{p,d} + 2\alpha t^3_{p,d} \right) = -(2 + \alpha ^2)t^2_{p,d} + 2\alpha t^3_{p,d} + O(t^4_{p,d}) \\&= -(3 + (\alpha ^2 - 1))t^2_{p,d} + 2\alpha t^3_{p,d} + O(t^4_{p,d}), \;\; n\rightarrow \infty . \end{aligned}$$

From (5) one can easily deduce that

$$\begin{aligned} \exp \left( -\frac{d-1}{2} t^2_{p,d}\right) = C_e(p,d) p t_{p,d}\sqrt{d} \exp \left( O(t^4_{p,d}d) \right) , \end{aligned}$$

where \(1 \le C_e(p,d) \le 12\) is some function that depends only on *p* and *d*. Therefore,

$$\begin{aligned}{}&\left( 1 - (3 + (\alpha ^2 - 1))t^2_{p,d} + 2\alpha t^3_{p,d} \right) ^{(d-1)/2} \nonumber \\&= \exp \left\{ -3\frac{d-1}{2} t^2_{p,d} \right\} \exp \left\{ -\frac{d-1}{2} \left( (\alpha ^2 - 1)t^2_{p,d} - 2\alpha t^3_{p,d} + O(t^4_{p,d}) \right) \right\} \nonumber \\&= C_e^3(p,d) p^3 t^3_{p,d} d^{3/2} \exp \left\{ -\frac{d-1}{2} \left( (\alpha ^2 - 1)t^2_{p,d} - 2\alpha t^3_{p,d} + O(t^4_{p,d}) \right) \right\} . \end{aligned}$$

(12)

We have transformed the main term of (11). Let us deal with ‘unimportant’ parts of (10) and (11). Denote

$$\begin{aligned} h_l(\alpha , p, d)&= \frac{C_f(d) C_e^3(p,d)}{2\pi } \cdot \frac{(1+\alpha t_{p,d}) \left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{3/2}}{1 - (3 + (\alpha ^2 - 1))t^2_{p,d} + 2\alpha t^3_{p,d}};\\ h_u(\alpha , p, d)&= \frac{2C_f(d) C_e^3(p,d)}{\pi } \cdot \frac{(1+\alpha t_{p,d})^{3/2}}{\sqrt{1-\alpha t_{p,d}}} \cdot \frac{\left( 1 - \frac{2t^2_{p,d}}{1+\alpha t_{p,d}} \right) ^{3/2}}{1 - (3 + (\alpha ^2 - 1))t^2_{p,d} + 2\alpha t^3_{p,d}}. \end{aligned}$$

Since \(1 \le \alpha \le 2\) and \(t_{p,d} \rightarrow 0\), for sufficiently large *n* and some constants \(C_l > 0\) and \(C_u > 0\),

$$\begin{aligned} h_l(\alpha , p, d) \ge \frac{C_f(d) C_e^3(p,d)}{4\pi } \cdot \frac{(1+t_{p,d}) \left( 1 - \frac{2t^2_{p,d}}{1+t_{p,d}} \right) ^{5/2}}{1 - 3t^2_{p,d} + 4t^3_{p,d}} \ge 6\sqrt{2\pi } C_l. \end{aligned}$$

(13)

and

$$\begin{aligned} h_u(\alpha , p, d) \le \frac{C_f(d) C_e^3(p,d) (1+2t_{p,d})^{3/2} \left( 1 - \frac{2t^2_{p,d}}{1+2t_{p,d}} \right) ^{3/2}}{\pi \sqrt{1-t_{p,d}} (1 - 6t^2_{p,d} + 2t^3_{p,d})} \le 6\sqrt{2\pi } C_u. \end{aligned}$$

(14)

Then, plugging (11), (12), (13) and (14) into (10), we obtain the following final bounds on \(T_1\) at this step:

$$\begin{aligned} 6\sqrt{2\pi }C_l dt^4_{p,d} p^3 \int _1^2 \exp \left\{ -\frac{d-1}{2} \left( (\alpha ^2 - 1) t^2_{p,d} - 2\alpha t^3_{p,d} + O(t^4_{p,d}) \right) \right\} d\alpha \le T_1 \le \nonumber \\ \le 6\sqrt{2\pi }C_l dt^2_{p,d} p^3 \int _1^2 \exp \left\{ -\frac{d-1}{2} \left( (\alpha ^2 - 1)t^2_{p,d} - 2\alpha t^3_{p,d} + O(t^4_{p,d}) \right) \right\} d\alpha . \end{aligned}$$

(15)

**Expression of bounds on** \(T_1\) **with the CDF of the standard normal distribution** One can easily get that

$$\begin{aligned} (\alpha ^2 - 1)t^2_{p,d} - 2\alpha t^3_{p,d} + O(t^4_{p,d}) = t^2_{p,d} \left( (\alpha - t_{p,d})^2 - 1 + O(t^2_{p,d}) \right) {,} \end{aligned}$$

which implies

$$\begin{aligned}{}&\int _1^2 \exp \left\{ -\frac{d-1}{2} \left( (\alpha ^2 - 1)t^2_{p,d} - 2\alpha t^3_{p,d} + O(t^4_{p,d}) \right) \right\} d\alpha \\&= \exp \left\{ \frac{d-1}{2} t^2_{p,d} (1+O(t^2_{p,d}))\right\} \int _1^2 \exp \left\{ -\frac{d-1}{2} t^2_{p,d} (\alpha - t_{p,d})^2 \right\} d\alpha . \end{aligned}$$

Let us treat the integral in the right-hand side of the last equation. Changing the variable \(\beta = (\alpha - t_{p,d})t_{p,d} \sqrt{d-1}\), we obtain that

$$\begin{aligned}{}&\int _1^2 \exp \left\{ -\frac{d-1}{2} t^2_{p,d} (\alpha - t_{p,d})^2 \right\} d\alpha = \frac{1}{t_{p,d}\sqrt{d-1}} \int _{(1-t_{p,d})t_{p,d}\sqrt{d-1}}^{(2-t_{p,d})t_{p,d}\sqrt{d-1}} e^{-\beta ^2/2} d\beta \\&= \frac{1}{t_{p,d}\sqrt{d-1}} \left( \Phi ((2-t_{p,d})t_{p,d}\sqrt{d-1}) - \Phi ((1-t_{p,d})t_{p,d}\sqrt{d-1}) \right) . \end{aligned}$$

Since \(t_{p,d}\sqrt{d-1} \rightarrow \infty\) as \(n\rightarrow \infty\),

$$\begin{aligned} \Phi ((2-t_{p,d})t_{p,d}\sqrt{d-1}) - \Phi ((1-t_{p,d})t_{p,d}\sqrt{d-1}) \\ = \frac{e^{-(1-t_{p,d})^2 t^2_{p,d}(d-1)/2}}{(1-t_{p,d}) t_{p,d}\sqrt{2\pi (d-1)}}(1+o(1)) - \frac{e^{-(2-t_{p,d})^2 t^2_{p,d}(d-1)/2}}{(2-t_{p,d}) t_{p,d}\sqrt{2\pi (d-1)}}(1+o(1)). \end{aligned}$$

But the ratio of the second and the first terms in the right-hand side converges to 0 as \(n\rightarrow \infty\). Indeed,

$$\begin{aligned}{}&\frac{e^{-(2-t_{p,d})^2 t^2_{p,d}(d-1)/2}}{e^{-(1-t_{p,d})^2 t^2_{p,d}(d-1)/2}} \cdot \frac{2-t_{p,d}}{1-t_{p,d}} \le 3 \exp \left\{ {\frac{d-1}{2} t^2_{p,d} ((1-t_{p,d})^2-(2-t_{p,d})^2)} \right\} \nonumber \\&= 3 \exp \left\{ {\frac{d-1}{2} t^2_{p,d} (-3+2t_{p,d})} \right\} \le 3\exp \left\{ -2\cdot \frac{d-1}{2} t^2_{p,d} \right\} \rightarrow 0, \;\; n\rightarrow \infty . \end{aligned}$$

(16)

The condition \(t_{p,d} \rightarrow 0\) implies that

$$\begin{aligned} \int _1^2 \exp \left\{ -\frac{d-1}{2} t_{p,d} (\alpha - t_{p,d})^2 \right\} d\alpha = \frac{e^{-(1-t_{p,d})^2 t^2_{p,d}(d-1)/2}}{t^2_{p,d} d \sqrt{2\pi }} (1 + o(1)), \end{aligned}$$

and, therefore,

$$\begin{aligned}{}&\exp \left\{ \frac{d-1}{2} t^2_{p,d} (1+O(t^2_{p,d}))\right\} \int _1^2 \exp \left\{ -\frac{d-1}{2} t^2_{p,d} (\alpha - t_{p,d})^2 \right\} d\alpha \nonumber \\&= \frac{e^{d(t^3_{p,d} + O(t^4_{p,d}))}}{t^2_{p,d} d \sqrt{2\pi }} (1+o(1)) = \frac{e^{dt^3_{p,d}}}{t^2_{p,d} d \sqrt{2\pi }} (1+o(1)). \end{aligned}$$

(17)

The last equality holds because under the condition \(d \gg \log ^2 n\), it is true that \(dt^4_{p,d} \rightarrow 0\) as \(n\rightarrow \infty\), and \(e^{dt^4_{p,d}} \rightarrow 1\). Putting (17) in (15) gives the final bounds on \(T_1\):

$$\begin{aligned} 6C_l p^3 t^2_{p,d} e^{t^3_{p,d} d} (1+o(1)) \le T_1 \le 6C_u p^3 e^{t^3_{p,d} d} (1+o(1)). \end{aligned}$$

This concludes the first part the proof.

**Estimation of** \(T_2\) The second term can be treated much more easily. Indeed, let us bound from above:

$$\begin{aligned} T_2&= \int _{2t_{p,d}}^1 {\mathbb {P}}\bigl (E_{2,3} E_{1,3} | E_{1,2}(x) \bigr ) f_d(x) \bigr ) dx \le \int _{2t_{p,d}}^1 f_d(x) dx \\&= C_f(d) \sqrt{d} \int _{2t_{p,d}}^1 (1-x^2)^{(d-3)/2} dx \le C_f(d) \sqrt{d} (1-4t^2_{p,d})^{(d-3)/2} \\&\le C_f(d) \sqrt{d} e^{-4t^2_{p,d}(d-3)/2}. \end{aligned}$$

But, similarly to the argumentation in (16), \(\sqrt{d} e^{-4t^2_{p,d}(d-3)/2}\) is \(\displaystyle o\left( p^3 t^2_{p,d} e^{t^3_{p,d} d}\right)\), hence, finally,

$$\begin{aligned} 6C_l p^3 t^2_{p,d} e^{t^3_{p,d} d} (1+o(1)) \le T_1 + T_2 = {\mathbb {P}}(E_{1,2}E_{2,3}E_{1,3}) \le 6C_u p^3 e^{t^3_{p,d} d} (1+o(1)). \end{aligned}$$

It is only left to use the standard asymptotic representation of the binomial coefficient \(\left( {\begin{array}{c}n\\ 3\end{array}}\right) = \frac{n^3}{6}(1+o(1))\) in order to obtain the bounds on the expected number of triangles:

$$\begin{aligned} C_l \theta ^3(n) t^2_{p,d} e^{t^3_{p,d} d} (1+o(1)) \le {\mathbb {E}}[N_3(n,p,d)] \le C_u \theta ^3(n) e^{t^3_{p,d} d} (1+o(1)), \;\; n\rightarrow \infty . \end{aligned}$$

The theorem is proved.

\(\square\)

Let us now discuss the result of this theorem. To make the expressions more handful, we consider only \(p = 1/n\), but the idea can be extended up to any sufficiently small *p*. First of all, in this case, as we know from Lemma 1, \(t^3_{p,d} d = \Theta \left( \frac{\log ^{3/2}n}{\sqrt{d}}\right)\). If \(d \ll \log ^3 n\), the exponent \(\exp \left( \frac{\log ^{3/2}n}{\sqrt{d}} \right)\) grows faster than any polylogarithmic function of *n*, which means that the obtained result is better than that of Lemma 3. Unfortunately, the upper bound of Theorem 7 is still \(1/t^2_{p,d}\) times larger than the lower bound, although this margin is much smaller than the ‘main’ term \(e^{t^3_{p,d} d}\). This exponent still grows slower than any power of *n*, but we believe that for \(d = \Theta (\log n)\), the number of triangles is linear (or almost linear) in *n*.