A005235 Fortunate numbers: least m > 1 such that m + prime(n)# is prime, where p# denotes the product of all primes <= p.
3, 5, 7, 13, 23, 17, 19, 23, 37, 61, 67, 61, 71, 47, 107, 59, 61, 109, 89, 103, 79, 151, 197, 101, 103, 233, 223, 127, 223, 191, 163, 229, 643, 239, 157, 167, 439, 239, 199, 191, 199, 383, 233, 751, 313, 773, 607, 313, 383, 293, 443, 331, 283, 277, 271, 401, 307, 331
Offset: 1
Examples
a(4) = 13 because P_4# = 2*3*5*7 = 210, plus one is 211, the next prime is 223 and the difference between 210 and 223 is 13.
References
- Martin Gardner, The Last Recreations, Chapter 12: Strong Laws of Small Primes, Springer-Verlag, 1997, pp. 191-205, especially pp. 194-195.
- Richard K. Guy, Unsolved Problems in Number Theory, 3rd ed., Springer, 1994, Section A2, p. 11.
- Stephen P. Richards, A Number For Your Thoughts, 1982, p. 200.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 114-115.
- David Wells, Prime Numbers: The Most Mysterious Figures In Math, Hoboken, New Jersey: John Wiley & Sons (2005), pp. 108-109.
Links
- Pierre CAMI, Table of n, a(n) for n = 1..3000 (first 2000 terms from T. D. Noe)
- Ray Abrahams and Huon Wardle, Fortune's 'Last Theorem', Cambridge Anthropology, Vol. 23, No. 1 (2002), pp. 60-62.
- Cyril Banderier, Conjecture checked for n < 1000 [It has been reported that the data given here contains several errors]
- C. K. Caldwell, Fortunate number, The Prime Glossary.
- Antonín Čejchan, Michal Křížek, and Lawrence Somer, On Remarkable Properties of Primes Near Factorials and Primorials, Journal of Integer Sequences, Vol. 25 (2022), Article 22.1.4.
- Martin Gardner, Patterns in primes are a clue to the strong law of sma11 numbers, Mathematical Games, Scientific American, Vol. 243, No. 6 (December, 1980), pp. 18-28.
- Solomon W. Golomb, The evidence for Fortune's conjecture, Mathematics Magazine, Vol. 54, No. 4 (1981), pp. 209-210.
- Richard K. Guy, Letter to N. J. A. Sloane, 1987
- Richard K. Guy, The strong law of small numbers. Amer. Math. Monthly 95 (1988), no. 8, 697-712.
- Richard K. Guy, The strong law of small numbers. Amer. Math. Monthly 95 (1988), no. 8, 697-712. [Annotated scanned copy]
- Bill McEachen, McEachen Conjecture
- Romeo Meštrović, Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof, arXiv preprint arXiv:1202.3670 [math.HO], 2012.
- Eric Weisstein's World of Mathematics, Fortunate Prime
- Robert G. Wilson v, Letter to N. J. A. Sloane with attachment, Jan 1992
Crossrefs
Programs
-
Haskell
a005235 n = head [m | m <- [3, 5 ..], a010051'' (a002110 n + m) == 1] -- Reinhard Zumkeller, Apr 02 2014
-
Maple
Primorial:= 2: p:= 2: A[1]:= 3: for n from 2 to 100 do p:= nextprime(p); Primorial:= Primorial * p; A[n]:= nextprime(Primorial+p+1)-Primorial; od: seq(A[n],n=1..100); # Robert Israel, Dec 02 2015
-
Mathematica
NPrime[n_Integer] := Module[{k}, k = n + 1; While[! PrimeQ[k], k++]; k]; Fortunate[n_Integer] := Module[{p, q}, p = Product[Prime[i], {i, 1, n}] + 1; q = NPrime[p]; q - p + 1]; Table[Fortunate[n], {n, 60}] r[n_] := (For[m = (Prime[n + 1] + 1)/2, ! PrimeQ[Product[Prime[k], {k, n}] + 2 m - 1], m++]; 2 m - 1); Table[r[n], {n, 60}] FN[n_] := Times @@ Prime[Range[n]]; Table[NextPrime[FN[k] + 1] - FN[k], {k, 60}] (* Jayanta Basu, Apr 24 2013 *) NextPrime[#]-#+1&/@(Rest[FoldList[Times,1,Prime[Range[60]]]]+1) (* Harvey P. Dale, Dec 15 2013 *)
-
PARI
a(n)=my(P=prod(k=1,n,prime(k)));nextprime(P+2)-P \\ Charles R Greathouse IV, Jul 15 2011; corrected by Jean-Marc Rebert, Jul 28 2015
-
Python
from sympy import nextprime, primorial def a(n): psharp = primorial(n); return nextprime(psharp+1) - psharp print([a(n) for n in range(1, 59)]) # Michael S. Branicky, Jan 15 2022
-
Sage
def P(n): return prod(nth_prime(k) for k in range(1, n + 1)) it = (P(n) for n in range(1, 31)) print([next_prime(Pn + 2) - Pn for Pn in it]) # F. Chapoton, Apr 28 2020
Formula
If x(n) = 1 + Product_{i=1..n} prime(i), q(n) = least prime > x(n), then a(n) = q(n) - x(n) + 1.
a(n) = 1 + the difference between the n-th primorial plus one and the next prime.
Comments