login
Numbers n such that p(n+1)#-p(n)#-p(n-1)#-1 is prime where p(i)#=product of first i primes=A002110(i).
5

%I #9 Apr 24 2014 13:10:34

%S 3,4,5,6,7,9,13,14,20,30,40,44,86,101,135,152,171,205,4404

%N Numbers n such that p(n+1)#-p(n)#-p(n-1)#-1 is prime where p(i)#=product of first i primes=A002110(i).

%t Flatten[Position[Partition[Rest[FoldList[Times,1,Prime[Range[210]]]],3,1],_?(PrimeQ[#[[3]]-#[[2]]-#[[1]]-1]&),{1},Heads->False]]+1 (* This generates the first 18 terms of the sequence. To generate the 19th term, change the Range constant to 4410, but it will take a very long time to run. *) (* _Harvey P. Dale_, Apr 23 2014 *)

%Y Cf. A002110, A128420, A128421, A128657, A128658, A128660, A128661, A128662.

%K nonn,more

%O 1,1

%A _Pierre CAMI_, Mar 19 2007