login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A115206
Least number d such that prime(n) -/+ 2d form a prime pair; prime(n) being the n-th prime.
0
1, 2, 3, 3, 3, 6, 3, 6, 6, 3, 6, 12, 3, 3, 6, 9, 3, 6, 3, 9, 12, 9, 15, 6, 3, 3, 15, 12, 12, 9, 15, 6, 9, 6, 3, 18, 15, 3, 6, 9, 21, 15, 15, 21, 6, 30, 15, 24, 3, 6, 15, 6, 3, 3, 6, 21, 3, 6, 27, 12, 12, 21, 18, 18, 9, 15, 18, 9, 3, 21, 15, 3, 15, 18, 15, 12, 9, 6, 15, 6, 6, 12, 9, 12, 9, 42, 9
OFFSET
3,2
FORMULA
a(n) = A078611(n)/2.
MATHEMATICA
f[n_] := Block[{k = 1, p = Prime@n}, While[ !PrimeQ[p - 2k] || !PrimeQ[p + 2k], k++ ]; k]; Table[f[n], {n, 3, 90}] (* Robert G. Wilson v, Mar 14 2006 *)
CROSSREFS
Cf. A078611.
Sequence in context: A133700 A087688 A126854 * A093653 A205442 A049982
KEYWORD
nonn
AUTHOR
Lekraj Beedassy, Mar 04 2006
EXTENSIONS
Corrected by N. J. A. Sloane, Mar 05 2006
More terms from Robert G. Wilson v, Mar 14 2006
STATUS
approved