# Leyland number

In number theory, a Leyland number is a number of the form
    $x^{y}+y^{x}$
where x and y are integers greater than 1. They are named after the mathematician Paul Leyland. The first few Leyland numbers are
    8, 17, 32, 54, 57, 100, 145, 177, 320, 368, 512, 593, 945, 1124 (sequence A076980 in the OEIS).
The requirement that x and y both be greater than 1 is important, since without it every positive integer would be a Leyland number of the form x$^1$ + 1$^x$. Also, because of the commutative property of addition, the condition x ≥ y is usually added to avoid double-covering the set of Leyland numbers (so we have 1 < y ≤ x).

## Leyland primes

A Leyland prime is a Leyland number that is prime. The first such primes are:
    17, 593, 32993, 2097593, 8589935681, 59604644783353249, 523347633027360537213687137, 43143988327398957279342419750374600193, ... (sequence A094133 in the OEIS)
corresponding to
    3$^2$+2$^3$, 9$^2$+2$^9$, 15$^2$+2$^{15}$, 21$^2$+2$^{21}$, 33$^2$+2$^{33}$, 24$^5$+5$^{24}$, 56$^3$+3$^{56}$, 32$^{15}$+15$^{32}$.
One can also fix the value of y and consider the sequence of x values that gives Leyland primes, for example x$^2$ + 2$^x$ is prime for x = 3, 9, 15, 21, 33, 2007, 2127, 3759, ... (OEIS: A064539).
By November 2012, the largest Leyland number that had been proven to be prime was 5122$^{6753}$ + 6753$^{5122}$ with 25050 digits. From January 2011 to April 2011, it was the largest prime whose primality was proved by elliptic curve primality proving. In December 2012, this was improved by proving the primality of the two numbers 3110$^{63}$ + 63$^{3110}$ (5596 digits) and 8656$^{2929}$ + 2929$^{8656}$ (30008 digits), the latter of which surpassed the previous record. In February 2023, 104824$^5$ + 5$^{104824}$ (73269 digits) was proven to be prime, and it was also the largest prime proven using ECPP, until three months later a larger (non-Leyland) prime was proven using ECPP. There are many larger known probable primes such as 314738$^9$ + 9$^{314738}$, but it is hard to prove primality of large Leyland numbers. Paul Leyland writes on his website: "More recently still, it was realized that numbers of this form are ideal test cases for general purpose primality proving programs. They have a simple algebraic description but no obvious cyclotomic properties which special purpose algorithms can exploit."
There is a project called XYYXF to factor composite Leyland numbers.
* Mathematics portal

## Leyland number of the second kind

A Leyland number of the second kind is a number of the form
    $x^{y}-y^{x}$
where x and y are integers greater than 1. The first such numbers are:
    0, 1, 7, 17, 28, 79, 118, 192, 399, 431, 513, 924, 1844, 1927, 2800, 3952, 6049, 7849, 8023, 13983, 16188, 18954, 32543, 58049, 61318, 61440, 65280, 130783, 162287, 175816, 255583, 261820, ... (sequence A045575 in the OEIS)
A Leyland prime of the second kind is a Leyland number of the second kind that is also prime. The first few such primes are:
    7, 17, 79, 431, 58049, 130783, 162287, 523927, 2486784401, 6102977801, 8375575711, 13055867207, 83695120256591, 375700268413577, 2251799813682647, ... (sequence A123206 in the OEIS). We can also consider 145 in the form of 4 to the power of 3 plus 4 to the power of 4.
For the probable primes, see Henri Lifchitz & Renaud Lifchitz, PRP Top Records search.