OFFSET
1,1
COMMENTS
Or, let S_1 = [2] and let S_{n+1} = list formed by sorting the union of S_n together with all prime factors of 1 + Product_i S_n(i) into increasing order; sequence is limit as n -> infinity of S_n.
Prime divisors of the terms of Sylvester's sequence A000058. - Max Alekseyev, Jan 03 2004. Also of A007018. - N. J. A. Sloane, Jan 27 2007
Because all terms of the sequence s(n) are coprime, a prime can divide at most one term. Odoni shows that primes p > 3 in this sequence must satisfy p = 1 (mod 6). - T. D. Noe, Sep 25 2010
See A180871(n) for the index of the first term of A000058 (this is one less than the index of the s-sequence) divisible by a(n). - M. F. Hasler, Apr 24 2014
LINKS
Max Alekseyev, Table of n, a(n) for n = 1..12046 (first 8181 terms are also given at the Andersen link)
J. K. Andersen, Factorization of Sylvester's sequence
R. Mestrovic, 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, 2012 - From N. J. A. Sloane, Jun 13 2012
R. W. K. Odoni, On the prime divisors of the sequence w_{n+1} = 1+w_1 ... w_n, J. London Math. Soc. 32 (1985), 1-11.
Filip Saidak, A New Proof of Euclid's Theorem, Amer. Math. Monthly, Dec 2006
Eric Weisstein's World of Mathematics, Sylvester's sequence
MAPLE
n := 1; for p do if isprime(p) then x := 2 mod p; S := {}; while not member(x, S) do if x=0 then a[n] := p; n := n+1; break; fi; S := S union {x}; x := (x^2-x+1) mod p; od; fi; od;
MATHEMATICA
t={}; p=1; While[Length[t]<100, p=NextPrime[p]; s=Mod[2, p]; k=0; modSet={}; While[s>0 && !MemberQ[modSet, s], AppendTo[modSet, s]; k++; s=Mod[s^2-s+1, p]]; If[s==0, AppendTo[t, {p, k}]]]; Transpose[t][[1]] (* T. D. Noe, Sep 25 2010 *)
PROG
(PARI) is(n)=my(k=Mod(2, n)); for(i=1, n, k=(k-1)*k+1; if(k==0, return(isprime(n)))); n==2 \\ Charles R Greathouse IV, Sep 30 2015
CROSSREFS
The missing primes form A096264.
KEYWORD
nonn
AUTHOR
Bennett Battaile (bennett.battaile(AT)autodesk.com)
EXTENSIONS
More terms from Max Alekseyev, Jan 03 2004
Entry revised by N. J. A. Sloane, Jan 28 2007
Definition corrected (following a remark by Don Reble) by M. F. Hasler, Apr 24 2014
STATUS
approved