

A066493


a(n) = least k such that f(k) = n, where f is the prime gaps function given by f(m) = p(m+1)p(m) and p(m) denotes the mth prime, if k exists; 0 otherwise.


0



1, 2, 0, 4, 0, 9, 0, 24, 0, 34, 0, 46, 0, 30, 0, 282, 0, 99, 0, 154, 0, 189, 0, 263, 0, 367, 0, 429, 0, 590, 0, 738, 0, 217, 0, 1183, 0, 3302, 0, 2191, 0, 1879, 0, 1831, 0, 7970, 0, 3077, 0, 3427
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Obviously, a(n) = 0 for every odd n except 1. From the list, it appears that a(n) is nonzero for every even n; is this true in general? That is, for each even n, are there primes which differ by n?


LINKS

Table of n, a(n) for n=1..50.


EXAMPLE

a(6) = 9 since k = 9 is the smallest k making p(k+1)p(k) = 6. a(3) = 0 since no two primes differ by 3.


MATHEMATICA

f[n_] := Prime[n + 1]  Prime[n]; g[n_] := Min[Select[Range[1, 10^4], f[ # ] == n &]]; Table[g[i], {i, 1, 50}]


CROSSREFS

Sequence in context: A182443 A128983 A265833 * A278510 A285773 A137449
Adjacent sequences: A066490 A066491 A066492 * A066494 A066495 A066496


KEYWORD

nonn


AUTHOR

Joseph L. Pe, Jan 03 2002


STATUS

approved



