|
Search: id:A051652
|
|
|
| A051652 |
|
Smallest number at distance n from nearest prime. |
|
+0 18
|
|
| 2, 1, 0, 26, 23, 118, 53, 120, 409, 532, 293, 1140, 211, 1340, 1341, 1342, 1343, 1344, 2179, 15702, 3967, 15704, 15705, 19632, 16033, 19634, 19635, 31424, 31425, 31426, 24281, 31428, 31429, 31430, 31431, 31432, 31433, 155958, 155959, 155960, 38501
(list; graph; listen)
|
|
|
OFFSET
|
0,1
|
|
|
LINKS
|
R. J. Mathar, Table of n, a(n) for n=0..80.
|
|
MAPLE
|
A051700 := proc(m) option remember ; if m <= 2 then op(m+1, [2, 1, 1]) ; else min(nextprime(m)-m, m-prevprime(m)) ; fi ; end:
A051652 := proc(n) local m ; if n = 0 then RETURN(2); else for m from 0 do if A051700(m) = n then RETURN(m) ; fi ; od: fi ; end:
for n from 0 to 79 do printf("%d %d\n", n, A051652(n)); od: # R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jul 22 2009
|
|
CROSSREFS
|
Related sequences: A023186-A023188, A046929-A046931, A051650, A051652, A051697-A051702, A051728-A051730.
Sequence in context: A129065 A024026 A009829 this_sequence A077019 A139037 A108511
Adjacent sequences: A051649 A051650 A051651 this_sequence A051653 A051654 A051655
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
N. J. A. Sloane (njas(AT)research.att.com).
|
|
EXTENSIONS
|
More terms from James A. Sellers (sellersj(AT)math.psu.edu), Dec 07 1999
|
|
|
Search completed in 0.002 seconds
|