login
Primes that do not divide any terms of the sequence f given by f(1) = 2, f(n+1) = f(n)^2-f(n)+1.
3

%I #24 Mar 26 2019 19:57:10

%S 5,11,17,19,23,29,31,37,41,47,53,59,61,67,71,79,83,89,97,101,103,107,

%T 109,113,127,131,137,149,151,157,163,167,173,179,191,193,197,199,211,

%U 223,227,229,233,239,241,251,257,263,269,271,277,281,283

%N Primes that do not divide any terms of the sequence f given by f(1) = 2, f(n+1) = f(n)^2-f(n)+1.

%H Jinyuan Wang, <a href="/A096264/b096264.txt">Table of n, a(n) for n = 1..5000</a>

%H R. W. K. Odoni, <a href="https://doi.org/10.1112/jlms/s2-32.1.1">On the prime divisors of the sequence w_{n+1} = 1+w_1 ... w_n</a>, J. London Math. Soc. 32 (1985), 1-11.

%p IsSylvester:=proc(p)

%p local x,S ;x:=2 : S:=NULL: while not member(x, [S]) do if x=0 then

%p return(true) fi; S := S ,x; x := (x^2-x+1) mod p od : return false end:

%p L:=NULL:p:=5:while p<1000 do if not IsSylvester(p) then L:=L,p fi : p:=nextprime(p) od:

%p L;

%p # _Robert FERREOL_, Feb 14 2019

%Y Complement of A007996 (in the primes).

%K nonn

%O 1,1

%A _Jeffrey Shallit_, Aug 04 2004

%E Definition corrected (following a remark by _Don Reble_) by _M. F. Hasler_, Apr 24 2014