A035346 Let F(n) = Q(n) - P(n) be the Fortunate numbers (A005235); sequence gives n such that F(n) = prime(n+1).
1, 2, 3, 6, 7, 8, 14, 16, 17, 21, 73, 801, 1971, 3332, 3469, 3509, 4318, 7986, 41292
Offset: 1
Examples
a(10) = 21 because A002110(21) + prime(22) = 40729680599249024150621323549 = 2*3*5*...*67*71*73 + 79 is prime.
Links
- 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.
- S. W. Golomb, The evidence for Fortune's conjecture, Math. Mag. 54 (1981), 209-210.
Programs
-
Maple
p:= 3: A[1]:= 1: count:= 1: Primorial:= 2: for n from 2 to 1000 do Primorial:= Primorial*p; p:= nextprime(p); if isprime(Primorial + p) then count:= count+1; A[count]:= n; fi od: seq(A[i],i=1..count); # Robert Israel, Dec 02 2015
-
Mathematica
Select[Range@ 801, PrimeQ[Product[Prime@ k, {k, #}] + Prime[# + 1]] &] (* Michael De Vlieger, Dec 02 2015 *)
-
PARI
lista(nn) = {s = 1; for(k=1, nn, s *= prime(k); if(ispseudoprime(s + prime(k+1)), print1(k, ", ")); ); } \\ Altug Alkan, Dec 02 2015
Extensions
a(10)-a(11) were found by Labos Elemer, May 02 2000
a(12) from Ralf Stephan, Oct 20 2002
Offset changed by Altug Alkan, Dec 02 2015
a(13) from Michael De Vlieger, Dec 02 2015
a(14)-a(18) from Altug Alkan, Dec 02 2015
a(19) from Henri Lifchitz, Nov 08 2024
Comments