login

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

Sophie Germain primes p such that the concatenation of p and 2p+1 is again prime.
2

%I #8 Jul 11 2023 10:53:11

%S 3,11,23,113,173,281,359,431,491,509,719,1103,1229,1559,1889,1931,

%T 2039,2393,2459,3413,3539,3761,3911,4391,4793,5303,6113,6263,6329,

%U 6491,6563,7643,7823,7883,8069,8093,8951,9221,9473,10061,10091,10589,10781,11369

%N Sophie Germain primes p such that the concatenation of p and 2p+1 is again prime.

%C A subsequence of A005384 (Sophie Germain primes: 2p+1 is prime) and of A168164 (which does not require 2p+1 to be prime).

%C The primes concat(p,2p+1) are listed in A168165.

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

%t sgp2Q[p_]:=Module[{s=2p+1},AllTrue[{s,p 10^IntegerLength[s]+s},PrimeQ]]; Select[ Prime[ Range[ 1500]],sgp2Q] (* _Harvey P. Dale_, Jul 11 2023 *)

%o (PARI) forprime(p=1,19999, isprime(2*p+1) & isprime(eval(Str(p,2*p+1))) & print1(p", "))

%K base,nonn

%O 1,1

%A _M. F. Hasler_, Nov 25 2009