OFFSET
3,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 3..1000
EXAMPLE
prime(103) = 563. prime(563) = 4091. 103 and 4091 are twin primes.
MATHEMATICA
Select[Prime[Prime[#]]&/@Union[Flatten[Select[Partition[Prime[Range[400]], 2, 1], #[[2]] - #[[1]]==2&]]], AnyTrue[#+{2, -2}, PrimeQ]&] (* The program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 21 2015 *)
PROG
(PARI) twips(n) = { c1=0; c2=0; forprime(x=3, n, if(isprime(x+2), c1++); x1=prime(prime(x)); if(isprime(x-2) || isprime(x+2), if(isprime(x1-2) || isprime(x1+2), print1(x1", "); c2++; ) ) ); print(); print(c2/c1+.0) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Oct 21 2003
STATUS
approved