login

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

Numbers n such that n is a twin prime and 2n + 1 is a twin prime.
1

%I #15 Aug 23 2015 10:21:24

%S 3,5,29,659,809,2129,2549,3329,3389,5849,6269,10529,33179,41609,44129,

%T 53549,55439,57329,63839,65099,70379,70979,72269,74099,74759,78779,

%U 80669,81929,87539,93239,102299,115469,124769,133979,136949,156419,161459,168449

%N Numbers n such that n is a twin prime and 2n + 1 is a twin prime.

%C n is a Sophie Germain prime and a twin prime, and 2*n+1 is also a twin prime.

%C Apparently this contains 3 and the members of A069142. - _R. J. Mathar_, Aug 23 2015

%H Harvey P. Dale, <a href="/A261463/b261463.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n+1) = A069142(n), n>=1. - _G. C. Greubel_, Aug 23 2015

%e 809 is a term because 809 and 811 are twin primes, and 2*809+1 = 1619 is a prime and a twin prime with 1621.

%t sgtpQ[n_]:=Module[{sgp=2n+1},PrimeQ[sgp]&&AnyTrue[sgp+{2,-2},PrimeQ]]; Select[Union[Flatten[Select[Partition[Prime[Range[25000]],2,1], #[[2]]- #[[1]] ==2&]]],sgtpQ] (* The program uses the AnyTrue function from Mathematica version 10 *)

%t p=PrimeQ; Select[Prime@ Range[10^5], p[2#+1] && (p[#+2] || p[#-2]) && (p[2#+3] || p[2#-1]) &] (* _Giovanni Resta_, Aug 20 2015 *)

%K nonn

%O 1,1

%A _Harvey P. Dale_, Aug 20 2015