login
Least k such that k*P(n)#-P(n+3) and k*P(n)#+P(n+3) are both primes with P(i)=i-th prime and P(i)#=i-th primorial.
0

%I #7 Mar 28 2015 22:34:55

%S 5,3,1,1,3,2,12,2,2,29,69,33,15,9,28,8,111,121,55,92,4,269,89,138,57,

%T 102,39,113,81,79,155,85,647,482,369,29,295,81,88,1,14,229,33,350,29,

%U 85,738,143,304,217,805,2421,166,370,616,111,621,543,160,200,1825,909,256

%N Least k such that k*P(n)#-P(n+3) and k*P(n)#+P(n+3) are both primes with P(i)=i-th prime and P(i)#=i-th primorial.

%e 2*3*5 - 13 = 17, prime; 2*3*5 + 13 = 43, prime; so for n=3, k=1.

%t Primorial[n_] := Product[ Prime[i], {i, n}]; f[n_] := Block[{k = 1, p = Primorial[n], q = Prime[n + 3]}, While[k*p - q < 2 || !PrimeQ[k*p - q] || !PrimeQ[k*p + q], k++ ]; k]; Table[ f[n], {n, 63}] (* _Robert G. Wilson v_, Aug 31 2004 *)

%K easy,nonn

%O 1,1

%A _Pierre CAMI_, Aug 27 2004

%E More terms from _Robert G. Wilson v_, Aug 31 2004