# Triangles with prime hypotenuse

- Sam Chow
^{1, 2}and - Carl Pomerance
^{1, 3}Email authorView ORCID ID profile

**Received: **3 April 2017

**Accepted: **27 June 2017

**Published: **9 October 2017

## Abstract

The sequence \(3, 5, 9, 11, 15, 19, 21, 25, 29, 35,\ldots \) consists of odd legs in right triangles with integer side lengths and prime hypotenuse. We show that the upper density of this sequence is zero, with logarithmic decay. The same estimate holds for the sequence of even legs in such triangles. We expect our upper bound, which involves the Erdős–Ford–Tenenbaum constant, to be sharp up to a double-logarithmic factor. We also provide a nontrivial lower bound. Our techniques involve sieve methods, the distribution of Gaussian primes in narrow sectors, and the Hardy–Ramanujan inequality.

## Keywords

## Mathematics Subject Classification

## 1 Background

*xy*, where \(x, y \in \mathbb N\) and \(x^2 + y^2\) is an odd prime. Let \(\mathcal A\) be the set of odd legs, and \(\mathcal B\) the set of even legs that occur in such triangles. Consider the quantities

### Theorem 1.1

Since every prime \(p\equiv 1\pmod 4\) is representable as \(a^2+b^2\) with *a*, *b* integral, we have \(\mathcal C(N)\) unbounded. In fact, using the maximal order of the divisor function, we have \(\mathcal C(N) \geqslant N^{1-o(1)}\) as \(N\rightarrow \infty \). We obtain a strengthening of this lower bound.

### Theorem 1.2

Note that \(\log 4-1\approx 0.386\). Since \(\mathcal B(2N) = \mathcal C(N)\), we obtain the same bounds for \(\mathcal B(N)\). By essentially the same proofs, one can also deduce these bounds for \(\mathcal A(N)\).

To motivate the outcome, consider the following heuristic. There are typically \(\approx (\log n)^{\log 2}\) divisors of *n*, which follows from the normal number of prime factors of *n*, a result of Hardy and Ramanujan [8]. Moreover, given a factorisation \(n=ab\), the “probability” of \(a^2+b^2\) being prime is roughly \((\log n)^{-1}\). Since \(\log 2 < 1\), we expect the proportion
to decay logarithmically. In the presence of biases and competing heuristics, this *prima facie* prediction should be taken with a few grains of salt. We use Brun’s sieve and the Hardy–Ramanujan inequality to formally establish our bounds. In addition, for Theorem 1.2 we use a result of Harman and Lewis [9] on the distribution of Gaussian primes in narrow sectors of the complex plane.

We write
for the set of primes. We use Vinogradov and Bachmann–Landau notation. As usual, we write
for the number of distinct prime divisors of *n*, and
for the number of prime divisors of *n* counted with multiplicity. The symbols *p* and \(\ell \) are reserved for primes, and *N* denotes a large positive real number.

## 2 An upper bound

*L*and follows instantly from the Taylor series for \(e^L\). Thus,

*n*, and let \(P^+(1)=1\). By de Bruijn [1, Eq. (1.6)] we may bound the size of the exceptional set

*N*. (Actually, the denominator may be taken as any fixed power of \(\log N\)).

*n*counted by \(\mathcal C^*(N)\), we see by symmetry that we have \(n = ab_0 \ell \) for some \(a,b_0, \ell \in \mathbb N\) with \(\ell > N^{1/\log \log N}\) prime and \(a^2 + b_0^2 \ell ^2\) prime. Thus

*g*defined by

*g*(

*p*)

*p*solutions \(m {\,\,{\mathrm{mod}}\,\,p}\). Observe that any divisor

*d*of

*P*(

*z*) must be squarefree; thus, by the Chinese remainder theorem, the congruence

*g*(

*d*)

*d*solutions \(m {\,\,{\mathrm{mod}}\,\,d}\). By periodicity, we now have

### Remark 2.1

Note that we might equally well have used the version of Brun’s sieve from [7, p. 68], which is less precise, but somewhat easier to utilise. In fact, as kindly suggested by one of the referees, one could accomplish the same result using Brun’s pure sieve [6, Eq. (6.1)], which is nothing more than a strategic truncation of the inclusion-exclusion principle.

## 3 A lower bound

### Theorem 3.1

*X*be a large positive real number, and let \({\beta }, {\gamma }\) be real numbers in the ranges

### Remark 3.2

The problem of counting Gaussian primes in narrow sectors has received quite some attention over the years, and still it is far from resolved. Rather than using Theorem 3.1 by Harman and Lewis [9], we could have used a weaker result by Kubilius [10] from the 1950s. We refer the interested reader to the introduction of [2] for more about the earlier history of this problem.

Next, we show that \(\# \mathcal L_j = o(N)\) (\(j=1,2,3\)).

### Lemma 3.3

We have \(\# \mathcal L_1 = o(N)\).

### Proof

### Lemma 3.4

### Proof

*ab*, we have

### Lemma 3.5

### Proof

*a*,

*b*,

*c*,

*d*) is counted by \(\mathcal S(N)\), put

*T*is as in (3.4). With \(U = 2T\), it follows from the multinomial theorem that

Combining (3.1) and (3.5) with Lemma 3.5 establishes Theorem 1.2.

## 4 A final comment

*a*,

*b*) with \(\omega (a)\approx \omega (b)\approx \frac{1}{2\log 2}\log \log N\). The upper bound for the second moment is analysed as in the paper, getting \(N/(\log N)^{\eta +o(1)}\); we expect that a more refined analysis would give

*a*,

*b*have a restricted number of prime factors. Such a result holds for the general distribution of Gaussian primes, at least if one restricts only one of

*a*,

*b*, see [5].

## Declarations

### Author's contributions

SC and CP jointly proved the theorems, drafted the manuscript, and polished it. Both authors have read and approved the final manuscript

### Open Access

This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

### Acknowledgements

The authors were supported by the National Science Foundation under Grant No. DMS-1440140 while in residence at the Mathematical Sciences Research Institute in Berkeley, California, during the Spring 2017 semester. The authors thank John Friedlander, Roger Heath-Brown, Zeev Rudnick, Andrzej Schinzel and the anonymous referees for helpful comments, and Tomasz Ordowski for suggesting the problem.

### Dedication

This year (2017) is the 100th anniversary of the publication of the paper *On the normal number of prime factors of a number n*, by Hardy and Ramanujan, see [8]. Though not presented in such terms, their paper ushered in the subject of probabilistic number theory. Simpler proofs have been found, but the original proof contains a very useful inequality, one which we are happy to use yet again. We dedicate this note to that seminal paper.

### Competing interests

The authors declare that they have no competing interests.

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Authors’ Affiliations

## References

- de Bruijn, N.G.: On the number of positive integers \(\le x\) and free of prime factors \(>y\). Nederl. Acad. Wetensch. Proc. Ser. A
**54**, 50–60 (1951)MathSciNetMATHGoogle Scholar - Coleman, M.D.: The Rosser–Iwaniec sieve in number fields, with an application. Acta Arith.
**65**, 53–83 (1993)MathSciNetMATHGoogle Scholar - Ford, K.: The distribution of integers with a divisor in a given interval. Ann. Math.
**168**, 367–433 (2008)MathSciNetView ArticleMATHGoogle Scholar - Ford, K., Luca, F., Pomerance, C.: The image of Carmichael’s \(\lambda \)-function. Algebra Number Theory
**8**, 2009–2025 (2014)MathSciNetView ArticleMATHGoogle Scholar - Fouvry, E., Iwaniec, H.: Gaussian primes. Acta Arith.
**79**, 249–287 (1997)MathSciNetMATHGoogle Scholar - Friedlander, J.B., Iwaniec, H.: Opera de Cribro, American Mathematical Society Colloquium Publications 57. American Mathematical Society, Providence (2010)Google Scholar
- Halberstam, H., Richert, H.E.: Sieve methods, London Mathematical Society Monographs, No. 4. Academic Press (A subsidiary of Harcourt Brace Jovanovich, Publishers), London (1974)Google Scholar
- Hardy, G.H., Ramanujan, S.: The normal number of prime factors of a number \(n\). Q. J. Math.
**48**, 76–92 (1917)MATHGoogle Scholar - Harman, G., Lewis, P.: Gaussian primes in narrow sectors. Mathematika
**48**, 119–135 (2001)MathSciNetView ArticleMATHGoogle Scholar - Kubilius, J.: On a problem in the \(n\)-dimensional analytic theory of numbers, Vilniaus Valst. Univ. Mokslo Darbai. Mat. Fiz. Chem. Mokslu Ser.
**4**, 5–43 (1955). (in Lithuanian; Russian summary)MathSciNetGoogle Scholar - McNew, N., Pollack, P., Pomerance, C.: Numbers divisible by a large shifted prime and large torsion subgroups of CM elliptic curves. IMRN (2016). doi:10.1093/imrn/rnw173 Google Scholar
- Tenenbaum, G.: Sur une question d’Erdős et Schinzel, pp. 405–443. Cambridge University Press, Cambridge, A tribute to Paul Erdős (1990)Google Scholar