OFFSET
1,1
FORMULA
EXAMPLE
The first prime is 2. The 2nd upper twin prime is 7, which gives the first entry.
MATHEMATICA
With[{twprs=Transpose[Select[Partition[Prime[Range[10000]], 2, 1], Last[#]- First[#] == 2&]][[2]]}, Flatten[Table[Take[twprs, {Prime[n]}], {n, 50}]]] (* Harvey P. Dale, Jul 25 2011 *)
PROG
(PARI) twinu(n) = { my(c=0, x=1); while(c<n, if(isprime(prime(x)+2), c++); x++; ); prime(x) }
a(n) = twinu(prime(n))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, May 17 2007
STATUS
approved