Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A160666
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A160666 Numbers whose distance to the closest prime number is a prime number +0
1
0, 9, 15, 21, 25, 26, 27, 33, 34, 35, 39, 45, 49, 50, 51, 55, 56, 57, 63, 64, 65, 69, 75, 76, 77, 81, 85, 86, 87, 91, 92, 94, 95, 99, 105, 111, 115, 116, 118, 120, 122, 124, 125, 129, 133, 134, 135, 141, 142, 144, 146, 147, 153, 154, 155, 159, 160, 161, 165, 169, 170 (list; graph; listen)
OFFSET

1,2

COMMENT

Terms n=2..31 are identical to terms n=1..30 of A079364

LINKS

K. Stern, Table of n, a(n) for n=1..10000

MAPLE

isA160666 := proc(n) local ppl, pmi ; if isprime(n) then RETURN(false): elif n =0 then RETURN(true): elif n =1 then RETURN(false): fi; ppl := nextprime(n)-n ; pmi := n-prevprime(n) ; RETURN (isprime(min(ppl, pmi)) ) ; end: for n from 0 to 200 do if isA160666(n) then printf("%d, ", n) ; fi; od: [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), May 25 2009]

MATHEMATICA

fQ[n_] := PrimeQ[ Min[ NextPrime[n] - n, n - NextPrime[n, -1]]]; Select[ Range[0, 174], !PrimeQ@ # && fQ@# &] [From Robert G. Wilson v (rgwv(AT)rgwv.com), May 25 2009]

CROSSREFS

Cf. A000040, A051699

Sequence in context: A058211 A038599 A079364 this_sequence A039769 A071904 A014076

Adjacent sequences: A160663 A160664 A160665 this_sequence A160667 A160668 A160669

KEYWORD

nonn

AUTHOR

Kyle Stern (kstern1(AT)umbc.edu), May 22 2009

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl) and Robert G. Wilson v (rgwv(AT)rgwv.com), May 25 2009

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 | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 13 23:45 EST 2009. Contains 170824 sequences.


AT&T Labs Research