login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A102632 Smallest k such that at least one of 2^k+/-prime(n) is prime. 2
0, 1, 1, 2, 1, 2, 1, 2, 3, 1, 4, 2, 1, 2, 5, 3, 1, 6, 2, 1, 4, 2, 7, 3, 2, 1, 2, 1, 2, 7, 2, 3, 1, 9, 1, 4, 4, 2, 5, 3, 1, 4, 1, 2, 1, 6, 4, 2, 1, 2, 3, 1, 4, 5, 9, 3, 1, 9, 2, 1, 6, 7, 2, 1, 2, 5, 4, 4, 1, 2, 16, 3, 4, 4, 2, 10, 3, 2, 3, 9, 1, 8, 1, 4, 2, 7, 3, 2, 1, 2, 5, 3, 2, 3, 2, 7, 5, 1, 6, 4, 4, 9, 3, 1 (list; graph; refs; listen; history; internal format)
OFFSET

1,4

LINKS

Lei Zhou, Between 2^n and primes.

EXAMPLE

For prime(2)=3, 2^1+3 = 5 is prime

For prime(18)=61, 2^6-61 = 3 is prime

MATHEMATICA

f[n_] := Block[{k = 0, p = Prime[n]}, While[ Not[(2^k - p > 1 && PrimeQ[2^k - p]) || PrimeQ[2^k + p]], k++ ]; k]; Table[ f[n], {n, 104}] (from Robert G. Wilson v Jan 22 2005)

CROSSREFS

Cf. A102930, A102931, A094076, first occurrence in A103032.

Sequence in context: A028334 A083269 A097306 * A094076 A089611 A082067

Adjacent sequences:  A102629 A102630 A102631 * A102633 A102634 A102635

KEYWORD

nonn

AUTHOR

Lei Zhou (lzhou5(AT)emory.edu), Jan 20 2005

EXTENSIONS

More terms from Robert G. Wilson v (rgwv(AT)rgwv.com), Jan 21 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 13 16:05 EST 2012. Contains 205522 sequences.