login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A129781
The prime(n)-th upper twin prime.
1
7, 13, 31, 61, 139, 181, 241, 283, 433, 643, 811, 1033, 1153, 1279, 1429, 1669, 1933, 1999, 2143, 2341, 2551, 2791, 3121, 3361, 3583, 3853, 3931, 4093, 4159, 4261, 5011, 5281, 5641, 5659, 6361, 6553, 6781, 7129, 7351, 7759, 8233, 8389, 9013, 9241, 9433
OFFSET
1,1
FORMULA
a(n) = A006512(A000040(n)). - Andrew Howroyd, Sep 12 2024
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
Sequence in context: A107146 A201601 A284353 * A174217 A040061 A289123
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, May 17 2007
STATUS
approved