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!)
A171162 Define Sophie Germain isolated primes to be primes p such that 2p+1 is also prime and so that p-2 and p+2 are not primes. The sequence contains Sophie Germain isolated primes p such that the previous prime to p and the succeeding prime to p are both also Sophie Germain isolated primes. 1
103619, 145109, 291503, 356591, 362759, 367733, 475523, 521831, 527123, 603191, 609809, 691979, 726419, 810809, 812939, 825491, 940421, 998213, 1117793, 1132811, 1231889, 1329143, 1331789, 1433891, 1433903, 1549403, 1623059 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
f[n_]:=PrimeQ[2*n+1]&&!PrimeQ[n-2]&&!PrimeQ[n+2]; PrimeNext[n_]:=Module[{k}, k=n+1; While[ !PrimeQ[k], k++ ]; k]; PrimePrev[n_]:=Module[{k}, k=n-1; While[ !PrimeQ[k], k-- ]; k]; lst={}; Do[p=Prime[n]; If[f[p], If[f[PrimePrev[p]]&&f[PrimeNext[p]], AppendTo[lst, p]]], {n, 9!}]; lst
sgpQ[n_]:=Module[{nxt=NextPrime[n], prev=NextPrime[n, -1]}, AllTrue[{2n+1, 2nxt+1, 2prev+1}, PrimeQ]&&!PrimeQ[n+2]&&!PrimeQ[n-2]&&!PrimeQ[nxt+2] && !PrimeQ[nxt-2]&&!PrimeQ[prev+2]&&!PrimeQ[prev-2]]; Select[Prime[ Range[ 400000]], sgpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 21 2017 *)
Select[Partition[Prime[Range[100000]], 5, 1], Min[ Differences[#]]> 2 && AllTrue[ 2*#[[2;; 4]]+1, PrimeQ]&][[All, 3]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 22 2017 *)
CROSSREFS
Sequence in context: A147526 A269218 A237894 * A235721 A210180 A136312
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition rewritten by Harvey P. Dale, Feb 21 2017
STATUS
approved

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 September 6 17:04 EDT 2024. Contains 375715 sequences. (Running on oeis4.)