The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104201 Sums of straddle primes. 1
8, 12, 18, 18, 18, 24, 30, 30, 30, 36, 42, 42, 42, 52, 52, 52, 52, 52, 60, 68, 68, 68, 68, 68, 78, 78, 78, 84, 90, 90, 90, 100, 100, 100, 100, 100, 112, 112, 112, 112, 112, 120, 128, 128, 128, 128, 128, 138, 138, 138, 144, 152, 152, 152, 152, 152, 162, 162, 162, 172 (list; graph; refs; listen; history; text; internal format)
OFFSET
4,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 4..10000
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 and 3+5 = 8 the first entry in the table.
PROG
(PARI) strad(n) = my (y, pp, np); for(x=1, n, y=composite(x); pp=precprime(y); np=nextprime(y); print1(pp+np", "))
composite(n) = my(c=1, x=1); while(c <= n, x++; if(!isprime(x), c++)); x
(PARI) list(lim)=my(v=List(), p=3, t); forprime(q=5, , t=p+q; if(t>lim, return(Vec(v))); for(i=2, q-p, listput(v, t)); p=q) \\ Charles R Greathouse IV, Jan 22 2016
CROSSREFS
Sequence in context: A091523 A257162 A352880 * A036327 A340681 A051144
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Mar 13 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 16:04 EDT 2024. Contains 373133 sequences. (Running on oeis4.)