OFFSET
1,1
EXAMPLE
The four closest primes to 1327 are 1321 (difference = 6), 1319 (difference = 8), 1307 (different = 20) and 1303 (difference =24). 1321, 1319, 1307 and 1303 are all smaller than 1327, so 1327 is in the list.
MATHEMATICA
#[[5]]&/@Select[Partition[Prime[Range[2500]], 6, 1], #[[5]]-#[[1]]<#[[6]]-#[[5]]&] (* Harvey P. Dale *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Neil Fernandez, Oct 10 2002
EXTENSIONS
Edited by Robert G. Wilson v, Oct 11 2002
STATUS
approved