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!)
A158866 Indices of twin primes if the sum of these twin primes+1 is an upper twin prime. 3

%I #19 Mar 07 2018 02:31:58

%S 2,5,30,31,66,73,88,91,141,147,217,513,607,637,743,760,784,845,856,

%T 911,920,938,949,958,994,1015,1031,1092,1150,1246,1373,1470,1553,1586,

%U 1768,1814,1871,2017,2029,2129,2261,2271,2331,2370,2458,2488,2510,2545,2579

%N Indices of twin primes if the sum of these twin primes+1 is an upper twin prime.

%C If the sum is a member of a twin prime pair, it always is the upper twin prime member. [Proof: Twin primes are sequentially of the form 6n-1 and 6n+1. Then adding according to the condition, we get 6n-1+6n+1+1 = 12n+1. This implies 12n+1 is an upper member since if it were a lower member, 12n+1+2 would be the upper member but 12n+3 is not prime contradicting the definition of a twin prime. Therefore 12n+1 must be an upper twin prime member as stated.]

%H Robert Israel, <a href="/A158866/b158866.txt">Table of n, a(n) for n = 1..10000</a>

%F {k: A054735(k)+1 = A006512(j), any j} - _R. J. Mathar_, Apr 06 2009

%e The 30th lower twin prime is 659. 659+661+1 = 1321, prime and 1319 is too.

%e Then 1319 is the lower member of the twin prime pair (1319,1321). So 30 is in the sequence.

%p count:= 0: Res:= NULL:

%p k:= 1:

%p for j from 1 while count < 100 do

%p if isprime(6*j-1) and isprime(6*j+1) then

%p k:= k+1;

%p if isprime(12*j-1) and isprime(12*j+1) then

%p count:= count+1;

%p Res:= Res,k;

%p fi

%p fi

%p od:

%p Res; # _Robert Israel_, Mar 06 2018

%t utpQ[{a_, b_}]:=And@@PrimeQ[a + b + {1, -1}]; Flatten[Position[Select[ Partition[Prime[Range[25000]],2,1],#[[2]]-#[[1]]==2&],_?utpQ]] (* _Harvey P. Dale_, Sep 16 2013 *)

%o (PARI) twinl(n) = { local(c,x); c=0; x=1; while(c<n, if(isprime(prime(x)+2),c++); x++; ); return(prime(x-1)) } \\ The n-th lower twin prime

%o g(n)=for(x=1,n,y=2*twinl(x)+3;if(isprime(y)&&isprime(y-2), print1(x",")))

%Y Cf. A158870.

%K nonn

%O 1,1

%A _Cino Hilliard_, Mar 28 2009

%E Edited by _R. J. Mathar_, Apr 06 2009

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 April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)