OFFSET
5,4
FORMULA
For n>4 a(n)=( min{p : p>prime(n), p and 2*prime(n)-p are primes} - prime(n) ) / 6.
EXAMPLE
a(6)=1, a(25)=5.
MATHEMATICA
Table[p = Prime[i]; j = 0; While[j++; df = 6*j; ! ((PrimeQ[p + df]) && (PrimeQ[p - df]))]; j, {i, 5, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Serhat Sevki Dincer (sevki(AT)ug.bilkent.edu.tr), Nov 27 2002
EXTENSIONS
More terms from Pab Ter (pabrlos(AT)yahoo.com), May 27 2004
STATUS
approved