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!)
A118479 Least n-digit prime which is also a twin prime and Sophie Germain prime. 3

%I #23 Jul 20 2021 03:34:35

%S 3,11,179,1019,10091,100361,1000211,10001399,100001651,1000002359,

%T 10000003001,100000026569,1000000000061,10000000019759,

%U 100000000018109,1000000000029911,10000000000013741,100000000000004381

%N Least n-digit prime which is also a twin prime and Sophie Germain prime.

%H Harvey P. Dale, <a href="/A118479/b118479.txt">Table of n, a(n) for n = 1..100</a>

%e 3 and 5 are twin primes and 2*3+1=7 is prime, so 3 is the first of twin primes and is a Sophie Germain prime; it is the least such 1-digit prime, so a(1)=3.

%e 11 and 13 are twin primes and 2*11+1=23 is prime, so 11 is the first of twin primes and is a Sophie Germain prime; it is the least such 2-digit prime, so a(2)=11.

%t f[n_] := Block[{k = 10^(n - 1)}, While[ !PrimeQ[k] || !PrimeQ[k + 2] || !PrimeQ[2k + 1], k++ ]; k]; Array[f, 18] (* _Robert G. Wilson v_, May 13 2006 *)

%t lndp[n_]:=Module[{p=NextPrime[10^n]},While[NoneTrue[p+{2,-2},PrimeQ] || !PrimeQ[2p+1],p=NextPrime[p]];p]; Array[ lndp,20,0] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Apr 06 2019 *)

%Y Cf. A001359, A005384.

%K nonn,base

%O 1,1

%A _Pierre CAMI_, May 05 2006

%E Edited by _Robert G. Wilson v_, May 13 2006

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)