login
A129780
The prime(n)-th lower twin prime.
0
5, 11, 29, 59, 137, 179, 239, 281, 431, 641, 809, 1031, 1151, 1277, 1427, 1667, 1931, 1997, 2141, 2339, 2549, 2789, 3119, 3359, 3581, 3851, 3929, 4091, 4157, 4259, 5009, 5279, 5639, 5657, 6359, 6551, 6779, 7127, 7349, 7757, 8231, 8387, 9011, 9239, 9431
OFFSET
1,1
FORMULA
a(n) = A001359(A000040(n)). - Andrew Howroyd, Sep 12 2024
EXAMPLE
The first prime is 2. The 2nd lower twin prime is 5, which gives the first entry.
MATHEMATICA
Module[{maxp=50, tp}, tp=Select[Partition[Prime[Range[maxp*Prime[maxp]]], 2, 1], #[[2]] - #[[1]]==2&][[All, 1]]; Table[tp[[n]], {n, Prime[ Range[ maxp]]}]] (* Harvey P. Dale, Aug 06 2018 *)
PROG
(PARI) twinl(n) = { my(c=0, x=1); while(c<n, if(isprime(prime(x)+2), c++); x++; ); prime(x-1) }
a(n) = twinl(prime(n))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, May 17 2007
STATUS
approved