Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A059959
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A059959 Distance of 2^n from its nearest prime neighbor, and in case of a tie, choose the smaller. +0
4
-1, 0, 1, 1, -1, 1, 3, 1, -1, 3, 3, -5, 3, 1, 3, -3, -1, 1, -3, 1, 3, 9, 3, -9, 3, -35, 5, -29, -3, 3, -3, 1, 5, 9, -25, 31, 5, -9, -7, 7, -15, 21, 11, -29, -7, 55, -15, -5, -21, -69, 27, -21, -21, -5, 33, -3, 5, -9, 27, 55, -33, 1, 57, 25, -13, 49, 5, -3, 23, 19, -25, -11, -15, -29, 35, -33, 15, -11, -7, -23, -13, -17, -9, 55, -3, 19 (list; graph; listen)
OFFSET

0,7

FORMULA

a(n) = A000079(n)-A117387(n).

EXAMPLE

n=19, 2^19=524288, prevprime(524288)=524287, nextprime(524288)=524309, so min{21,1}=1=a(19)

MAPLE

with(numtheory): [seq(min(nextprime(2^i)-2^i, 2^i-prevprime(2^i)), i=2..100)];

MATHEMATICA

f[n_] := Block[{k = 0}, While[ !PrimeQ[2^n - k] && !PrimeQ[2^n + k], k++ ]; Min@Select[{2^n - k, 2^n + k}, PrimeQ@# &]]; Table[2^n - f[n], {n, 0, 85}] (from Robert G. Wilson v (rgwv(at)rgwv.com), Mar 14 2006)

CROSSREFS

Cf. A013597, A013603, A014210, A014234, A058249.

Sequence in context: A060592 A080426 A133116 this_sequence A051120 A114476 A117184

Adjacent sequences: A059956 A059957 A059958 this_sequence A059960 A059961 A059962

KEYWORD

sign

AUTHOR

Labos E. (labos(AT)ana.sote.hu), Mar 02 2001

EXTENSIONS

Signs added by Robert G. Wilson v (rgwv(at)rgwv.com), Mar 14 2006

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 July 26 13:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research