login
Smallest prime of the form (prime(n)*prime(n+1)+q)/2 for some integer n and some prime q.
1

%I #10 Jul 30 2015 01:23:11

%S 11,19,41,73,113,163,227,337,461,577,761,883,1013,1249,1567,1801,2053,

%T 2381,2593,2887,3299,3697,4337,4919,5231,5519,5843,6173,7177,8363,

%U 9007,9533,10357,11251,11863,12799,13613,14447,15493,16223,17291,18433,19013

%N Smallest prime of the form (prime(n)*prime(n+1)+q)/2 for some integer n and some prime q.

%H Vincenzo Librandi, <a href="/A100557/b100557.txt">Table of n, a(n) for n = 2..1000</a>

%e a(2) = 19 because 19 = (5*7 + 3)/2;

%e a(3) = 41 because 41 = (7*11 + 5)/2;

%e a(4) = 83 because 73 = (11*13 + 3)/2.

%t f[n_] := Block[{k = 2, q = Prime[n]Prime[n + 1]}, While[p = Prime[k]; !PrimeQ[(q + p)/2], k++ ]; (q + p)/2]; Table[ f[n], {n, 2, 44}] (* _Robert G. Wilson v_, Nov 29 2004 *)

%K nonn,easy

%O 2,1

%A _Giovanni Teofilatto_, Nov 28 2004

%E Edited, corrected and extended by _Robert G. Wilson v_, Nov 29 2004