OFFSET
1,1
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
p=41 is a member because 41 is a lesser of twin prime and 2^41 - 1 = 13367*164511353 is composite.
Similarly, p=227 is a member because 227 is a lesser of twin prime and 2^227 - 1 is composite.
MATHEMATICA
Function[s, Flatten@ Map[s[[#, 1]] &, Position[Most@ s, d_ /; Quiet@ Differences@ d == {2}, {1}]]]@ Partition[#, 2, 1] &@ Select[Prime@ Range@ 360, ! PrimeQ[2^# - 1] &] (* Michael De Vlieger, Jul 17 2017 *)
Select[Partition[Module[{nn=20, mp}, mp=MersennePrimeExponent[Range[nn]]; Complement[Prime[Range[PrimePi[Last[mp]]]], mp]], 2, 1], #[[2]]-#[[1]]==2 && AllTrue[#, PrimeQ]&][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 10 2019 *)
PROG
(GAP)
P1:=Difference(Filtered([1..100000], IsPrime), [2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243]);;
P2:=List([1..Length(P1)-1], i->[P1[i], P1[i+1]]);;
P3:=List(Positions(List(P2, i->i[2]-i[1]), 2), i->P2[i][1]);
(PARI) isok(n) = isprime(n) && isprime(n+2) && !isprime(2^n-1) && !isprime(2^(n+2)-1); \\ Michel Marcus, Jul 19 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Muniru A Asiru, Jul 17 2017
STATUS
approved