This site is supported by donations to The OEIS Foundation.

 Annual Appeal: Please make a donation to keep the OEIS running. In 2017 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A005235 Fortunate numbers: least m > 1 such that m + prime(n)# is prime, where p# denotes the product of all primes <= p. (Formerly M2418) 50

%I M2418

%S 3,5,7,13,23,17,19,23,37,61,67,61,71,47,107,59,61,109,89,103,79,151,

%T 197,101,103,233,223,127,223,191,163,229,643,239,157,167,439,239,199,

%U 191,199,383,233,751,313,773,607,313,383,293,443,331,283,277,271,401,307,331

%N Fortunate numbers: least m > 1 such that m + prime(n)# is prime, where p# denotes the product of all primes <= p.

%C R. F. Fortune conjectured that a(n) is always prime.

%C The first 500 terms are primes. - _Robert G. Wilson v_ [The first 2000 terms are prime. - _Joerg Arndt_, Apr 15 2013]

%C The strong form of CramÃ©r's conjecture implies that a(n) is a prime for n > 1618, as previously noted by Golomb. - _Charles R Greathouse IV_, Jul 05 2011

%C a(n) is the smallest m such that m > 1 and A002110(n) + m is prime. For every n, a(n) must be greater than prime(n+1) - 1. - _Farideh Firoozbakht_, Aug 20 2003

%C If a(n) < prime(n+1)^2 then a(n) is prime. According to Cramer's conjecture a(n) = O(prime(n)^2). - _Thomas Ordowski_, Apr 09 2013

%C From _Pierre CAMI_, Sep 08 2017: (Start)

%C a(n) = prime(i), lim_{N->inf} (Sum_{n=1..N} i) / (Sum_{n=1..N} n) = 3/2.

%C i/n is always < 6.

%C Lim_{N->inf} (Sum_{n=1..N} a(n)) / (Sum_{n=1..N} prime(n)) = Pi/2.

%C a(n) / prime(n) is always < 8.

%C (End)

%D Martin Gardner, The Last Recreations (1997), pp. 194-95.

%D R. K. Guy, Unsolved Problems in Number Theory, Section A2

%D Richards, Stephen P., A Number For Your Thoughts, 1982, p. 200.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Pierre CAMI, <a href="/A005235/b005235.txt">Table of n, a(n) for n = 1..3000</a> (first 2000 terms from T. D. Noe)

%H C. Banderier, <a href="http://algo.inria.fr/banderier/Computations/prime_factorial.html">Conjecture checked for n < 1000</a> [It has been reported that the data given here contains several errors]

%H S. W. Golomb, <a href="http://www.jstor.org/stable/2689634">The evidence for Fortune's conjecture</a>, Math. Mag. 54 (1981), 209-210.

%H R. K. Guy, <a href="/A005728/a005728.pdf">Letter to N. J. A. Sloane, 1987</a>

%H R. K. Guy, <a href="http://www.jstor.org/stable/2322249">The strong law of small numbers</a>. Amer. Math. Monthly 95 (1988), no. 8, 697-712.

%H R. K. Guy, <a href="/A005165/a005165.pdf">The strong law of small numbers</a>. Amer. Math. Monthly 95 (1988), no. 8, 697-712. [Annotated scanned copy]

%H Bill McEachen, <a href="http://garden.irmacs.sfu.ca/?q=op/maceachen_conjecture">McEachen Conjecture</a>

%H R. Mestrovic, <a href="http://arxiv.org/abs/1202.3670">Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof</a>, arXiv preprint arXiv:1202.3670 [math.HO], 2012.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/FortunatePrime.html">Fortunate Prime</a>

%H R. G. Wilson, V, <a href="/A005235/a005235.pdf">Letter to N. J. A. Sloane with attachment, Jan 1992</a>

%F If x(n) = 1 + Product_{i=1..n} prime(i), q(n) = least prime > x(n), then a(n) = q(n) - x(n) + 1.

%F a(n) = 1 + the difference between the n-th primorial plus one and the next prime.

%F a(n) = A035345(n) - A002110(n). - _Jonathan Sondow_, Dec 02 2015

%e 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.

%p Primorial:= 2:

%p p:= 2:

%p A[1]:= 3:

%p for n from 2 to 100 do

%p p:= nextprime(p);

%p Primorial:= Primorial * p;

%p A[n]:= nextprime(Primorial+p+1)-Primorial;

%p od:

%p seq(A[n],n=1..100); # _Robert Israel_, Dec 02 2015

%t 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}]

%t 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}]

%t FN[n_] := Times @@ Prime[Range[n]]; Table[NextPrime[FN[k] + 1] - FN[k], {k, 60}] (* _Jayanta Basu_, Apr 24 2013 *)

%t NextPrime[#]-#+1&/@(Rest[FoldList[Times,1,Prime[Range[60]]]]+1) (* _Harvey P. Dale_, Dec 15 2013 *)

%o (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

%o a005235 n = head [m | m <- [3, 5 ..], a010051'' (a002110 n + m) == 1]

%o -- _Reinhard Zumkeller_, Apr 02 2014

%o (Python)

%o from operator import mul

%o def x(n): return 1 + reduce(mul, [prime(i) for i in xrange(1, n + 1)])

%o print [nextprime(x(n)) - x(n) + 1 for n in xrange(1, 101)] # _Indranil Ghosh_, Mar 23 2017

%Y Cf. A046066, A002110, A006862, A035345, A035346, A055211, A129912, A010051, A005408, A038771, A038711.

%K nonn,nice

%O 1,1

%A _N. J. A. Sloane_

%E More terms from _Jud McCranie_

%E Guy lists 100 terms, as computed by Stan Wagon

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 10 09:49 EST 2018. Contains 318047 sequences. (Running on oeis4.)