%I #7 Aug 27 2023 14:37:30
%S 5,2,3,7,11,13,17,29,23,31,37,73,41,19,59,89,83,43,47,71,79,151,137,
%T 67,181,163,167,101,103,97,53,223,61,227,229,113,109,191,127,157,389,
%U 349,199,337,463,577,193,149,991,107,139,233,131,691,173,557,307,461,313,619,353,281,487,947,641,283,673,271,433,263
%N Lexicographically earliest sequence of distinct primes such that a(1)*a(2)*...*a(n-1) - a(n) is prime for n>=1 with a(1)=5.
%C Conjecture: This sequence contains all primes.
%C Conjecture: If f(n) = a(1)*a(2)*...*a(n-1) then f(n)-a(n) is the previous prime of f(n) - 1 for n > 1.
%e a(4) = 7 because 7 is the least prime not already in the sequence such that 5*2*3 - 7 = 30 - 7 = 23 which is prime.
%t a[1]=5;a[n_]:=a[n]=(k=2;While[MemberQ[s=Array[a,n-1],k]||!PrimeQ[Times@@s-k],k=NextPrime@k];k); Array[a,70]
%K nonn
%O 1,1
%A _Giorgos Kalogeropoulos_, Jul 25 2023
|