Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A087711
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A087711 a(n) = smallest number k such that both k-n and k+n are primes. +0
4
2, 4, 5, 8, 7, 8, 11, 10, 11, 14, 13, 18, 17, 16, 17, 22, 21, 20, 23, 22, 23, 26, 25, 30, 29, 28, 33, 32, 31, 32, 37, 36, 35, 38, 37, 38, 43, 42, 41, 44, 43, 48, 47, 46, 57, 52, 51, 50, 53, 52, 53, 56, 55, 56, 59, 58, 75, 70, 69, 72, 67, 66, 65, 68, 67, 72, 71, 70, 71, 80, 81, 78 (list; graph; listen)
OFFSET

0,1

LINKS

Zak Seidov, Table of n, a(n) for n=0..1000.

EXAMPLE

n=10: k=13 because 13-10 and 13+10 are both prime, and 13 is the smallest k such that k +/- 10 are both prime

4-1=3, prime, 4+1=5, prime; 5-2=3, 5+2=7; 8-3=5, 8+3=11; 9-4=5, 9+4=13, ...

MATHEMATICA

s = ""; k = 0; For[i = 3, i < 22^2, If[PrimeQ[i - k] && PrimeQ[i + k], s = s <> ToString[i] <> ", "; k++ ]; i++ ]; Print[s] - Vladimir Orlovsky (4vladimir(AT)gmail.com), Apr 03 2008

PROGRAM

(MAGMA) distance:=function(n); k:=n+2; while not IsPrime(k-n) or not IsPrime(k+n) do k:=k+1; end while; return k; end function; [ distance(n): n in [1..71] ]; /* Klaus Brockhaus, Apr 08 2007 */

CROSSREFS

Cf. A087695, A087696, A087697, A087678, A087679, A087680, A087681, A087682, A087683.

Cf. A082467. See A137169 for another version.

Adjacent sequences: A087708 A087709 A087710 this_sequence A087712 A087713 A087714

Sequence in context: A110991 A076990 A057168 this_sequence A123128 A057064 A088580

KEYWORD

easy,nonn

AUTHOR

Zak Seidov (zakseidov(AT)yahoo.com), Sep 28 2003

EXTENSIONS

Entries checked by Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Apr 08 2007

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 October 7 08:31 EDT 2008. Contains 144667 sequences.


AT&T Labs Research