OFFSET
2,1
COMMENTS
These primes are congruent to (prime(n)-1)/2 mod prime(n) if n > 4. Presumably all primes occur as 3rd term if initial prime is suitably chosen.
FORMULA
a(n) = Min[x; A094460(x) = prime(n)].
EXAMPLE
n=25: prime(25) = 97 and an Euclid-Mullin sequence started with a(25) = 5189 = 97*53 + 48 is {5189, 2, 97, 101, 3, 7, 167, 356568143863}.
All larger (prime) solutions with 97 as 3rd term have the form 97k + 48 form. However, not all primes of the form 97k + 48 result in Euclid-Mullin (EM) sequences with the property that the 3rd term is 97. For example, 727 = 7*97 + 48 is a prime providing an EM sequence as follows: {727, 2, 3, 4363, 19, 5, 1709, 11, 33988283132431, 7} with 3rd term = 3.
Analogous statements hold for other initial or 3rd primes.
MATHEMATICA
a[x_]:=First[Flatten[FactorInteger[Apply[Times, Table[a[j], {j, 1, x-1}]]+1]]]; ta=Table[0, {20000}]; a[1]=1; Do[{a[1]=Prime[j], el=3}; ta[[j]]=a[el], {j, 1, 20000}] Table[Prime[Min[Flatten[Position[ta, Prime[w]]]]], {w, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 10 2004
STATUS
approved