Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A082467
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A082467 Least k such that n-k and n+k are both primes. +0
9
1, 2, 1, 4, 3, 2, 3, 6, 1, 6, 3, 2, 3, 6, 1, 12, 3, 2, 9, 6, 5, 6, 3, 4, 9, 12, 1, 12, 9, 4, 3, 6, 5, 6, 9, 2, 3, 12, 1, 24, 3, 2, 15, 6, 5, 12, 3, 8, 9, 6, 7, 12, 3, 4, 15, 12, 1, 18, 9, 4, 3, 6, 5, 6, 15, 2, 3, 12, 1, 6, 15, 4, 3, 6, 5, 18, 9, 2, 15, 24, 5, 12, 3, 14, 9, 18, 7, 12, 9, 4, 15, 6, 7, 30, 9 (list; graph; listen)
OFFSET

4,2

COMMENT

The existence of k for all n >= 4 is equivalent to Goldbach's Conjecture that every even number >= 4 is the sum of two primes.

LINKS

Klaus Brockhaus, Table of n, a(n) for n = 4..5000

FORMULA

A078496(n)-a(n) = A078587(n)+a(n) = n.

EXAMPLE

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

MATHEMATICA

f[n_] := Block[{k}, If[OddQ[n], k = 2, k = 1]; While[ !PrimeQ[n - k] || !PrimeQ[n + k], k += 2]; k]; Table[ f[n], {n, 4, 98}] (from Robert G. Wilson v Mar 28 2005)

PROGRAM

(PARI) a(n)=if(n<0, 0, k=1; while(isprime(n-k)*isprime(n+k) == 0, k++); k)

CROSSREFS

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

Cf. A129301 (records), A129302 (where records occur).

Sequence in context: A109977 A080079 A087712 this_sequence A106407 A023141 A072650

Adjacent sequences: A082464 A082465 A082466 this_sequence A082468 A082469 A082470

KEYWORD

nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), Apr 27 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 August 19 23:53 EDT 2008. Contains 142930 sequences.


AT&T Labs Research