OFFSET
1,2
COMMENTS
a(n)=1 if 18n -/+ 1 are twin primes. Corresponding n's are in A137877.
Note that a(n) cannot be 2 (because, for arbitrary number m, if (6*m-1) is prime then (6*m+3) is not, and similarly, if (6*m+1) is prime then (6*m-3) is not). I conjecture that all other values are possible and a(n) == 0 (mod 3) are (much) more abundant.
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000
MAPLE
seq((nextprime(18*n)-prevprime(18*n))/2, n=1..100); # Robert Israel, Apr 19 2015
MATHEMATICA
Table[(NextPrime[18 n] - NextPrime[18 n, -1]) / 2, {n, 100}] (* Vincenzo Librandi, Apr 19 2015 *)
PROG
(PARI) a(n) = (nextprime(18*n) - precprime(18*n))/2; \\ Michel Marcus, Oct 13 2013
(Magma) [(NextPrime(18*n)-PreviousPrime(18*n))/2: n in [1..100]]; // Vincenzo Librandi, Apr 19 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 19 2008
STATUS
approved