OFFSET
4,1
COMMENTS
Straddle primes that occur only once on either side of the composite number are lower and upper twin primes respectively.
FORMULA
Straddle primes are the nearest primes preceding and following composite n.
EXAMPLE
The first straddle prime pair is 3 and 5 which straddles the composite number 4.
PROG
(PARI) strad(n) = { local (x, y, pp, np); for(x=1, n, y=composite(x); pp=precprime(y); np=nextprime(y); print1(np", ") ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Mar 13 2005
STATUS
approved