login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A129781 The prime(n)-th upper twin prime. 0

%I #5 Nov 21 2013 12:49:04

%S 7,13,31,61,139,181,241,283,433,643,811,1033,1153,1279,1429,1669,1933,

%T 1999,2143,2341,2551,2791,3121,3361,3583,3853,3931,4093,4159,4261,

%U 5011,5281,5641,5659,6361,6553,6781,7129,7351,7759,8233,8389,9013,9241,9433

%N The prime(n)-th upper twin prime.

%F Prime(n) = the n-th prime number.

%e The first prime is 2. The 2nd upper twin prime is 7, which gives the first entry.

%t 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 *)

%o (PARI) g(n) = for(x=1,n,y=twinu(prime(x));print1(y",")) twinu(n) = { local(c, x); c=0;x=1; while(c<n,if(isprime(prime(x)+2),c++);x++;); return(prime(x)) }

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, May 17 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 30 23:49 EDT 2024. Contains 374771 sequences. (Running on oeis4.)