# Fortunate number

Given a positive integer $n$, the $n$th Fortunate number $F_{n}>1$ is the difference between the primorial

 $\prod_{i=1}^{\pi(n)}p_{i}$

(where $\pi(x)$ is the prime counting function and $p_{i}$ is the $i$th prime number) and the nearest prime number above (ignoring the primorial prime that may be there). For example, the 3rd Fortunate number is 7, since the third primorial is 30 since the next highest prime is 37 (the primorial prime 31 is ignored).

The first few Fortunate numbers are 3, 5, 7, 13, 23, 17, 19, 23, 37, 61, 67, 61, 71, 47, 107, 59, 61, 109, 89, 103, 79, 151, etc. listed in http://www.research.att.com/ njas/sequences/A005235A005235 in Sloane’s OEIS. Some Fortunate numbers occur more than once, such as 23, which occurs for both the fifth and eighth primorials. so, the inequality $F_{n}>n$ always holds. These numbers are named after the anthropologist Reo Fortune, who conjectured on their primality.

Title Fortunate number FortunateNumber 2013-03-22 17:31:10 2013-03-22 17:31:10 PrimeFan (13766) PrimeFan (13766) 5 PrimeFan (13766) Definition msc 11A41