Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A104201
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A104201 Sums of straddle primes. +0
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; listen)
OFFSET

4,1

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.

PROGRAM

(PARI) \Straddle primes - largest prime preceding composite n and smallest \prime following n. strad(n) = { local (x, y, pp, np); for(x=1, n, y=composite(x); pp=precprime(y); np=nextprime(y); print1(pp+np", ") ) composite(n) = \ The n-th composite number. 1 is defined as as neither prime nor composite. { local(c, x); c=1; x=1; while(c <= n, x++; if(!isprime(x), c++); ); return(x) } }

CROSSREFS

Sequence in context: A129150 A030752 A091523 this_sequence A036327 A051144 A067537

Adjacent sequences: A104198 A104199 A104200 this_sequence A104202 A104203 A104204

KEYWORD

easy,nonn

AUTHOR

Cino Hilliard (hillcino368(AT)gmail.com), Mar 13 2005

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | The OEIS Foundation | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified March 20 09:10 EDT 2010. Contains 173642 sequences.


AT&T Labs Research