Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A157719
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A157719 Smallest k(n) in : p^p-+k=prime, than p(n) is prime. +0
1
1, 4, 42, 186, 1302, 114, 1980, 1638, 10800, 12882, 12972, 24324, 25602, 41706, 19236, 51864, 25752, 60672, 108936, 36468, 85176, 131718, 45216, 361710, 40716, 187998, 450684, 488784, 4842, 117450, 479304, 212610, 32670, 556062, 354432 (list; graph; listen)
OFFSET

1,2

COMMENT

2^2=4-+1=primes, 3^3=27-+4=primes, 5^5=3125-+42=3083,3167=primes, 7^7=823543-+186=823357,823729=primes, ...

LINKS

Robert G. Wilson, v, Table of n, a(n) for n = 1..75

MATHEMATICA

lst={1}; Do[p=Prime[n]; pp=p^p; Do[If[PrimeQ[pp-k]&&PrimeQ[pp+k], If[pp-k<2, Break[]]; AppendTo[lst, k]; Print[p.k]; Break[]], {k, 2, 10^9}], {n, 4!}]; lst

f[n_] := Block[ {pp = Prime[n]^Prime[n], k = If[n == 1, 1, 2]}, While[ !PrimeQ[pp - k] || !PrimeQ[pp + k], k += 2]; k]; lst = {}; Do[a = f@n; AppendTo[lst, a]; Print[{Prime@n, a}], {n, 100}] [From Robert G. Wilson, v (rgwv(AT)rgwv.com), Mar 20 2009]

CROSSREFS

Sequence in context: A076652 A078288 A089551 this_sequence A118447 A037296 A085954

Adjacent sequences: A157716 A157717 A157718 this_sequence A157720 A157721 A157722

KEYWORD

nonn

AUTHOR

Vladimir Orlovsky (4vladimir(AT)gmail.com), Mar 04 2009

EXTENSIONS

a(13) onwards from Robert G. Wilson, v (rgwv(AT)rgwv.com), Mar 20 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 10 12:37 EST 2009. Contains 170569 sequences.


AT&T Labs Research