OFFSET
1,1
COMMENTS
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.]
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
The 30th lower twin prime is 659. 659+661+1 = 1321, prime and 1319 is too.
Then 1319 is the lower member of the twin prime pair (1319,1321). So 30 is in the sequence.
MAPLE
count:= 0: Res:= NULL:
k:= 1:
for j from 1 while count < 100 do
if isprime(6*j-1) and isprime(6*j+1) then
k:= k+1;
if isprime(12*j-1) and isprime(12*j+1) then
count:= count+1;
Res:= Res, k;
fi
fi
od:
Res; # Robert Israel, Mar 06 2018
MATHEMATICA
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 *)
PROG
(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
g(n)=for(x=1, n, y=2*twinl(x)+3; if(isprime(y)&&isprime(y-2), print1(x", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Mar 28 2009
EXTENSIONS
Edited by R. J. Mathar, Apr 06 2009
STATUS
approved