OFFSET
1,1
EXAMPLE
19 is in this sequence because 2^(19-1) - 1 = 262143 = 3^3*7*19*73 and 2^(19+1) - 1 = 1048575 = 3*5^2*11*31*41.
MATHEMATICA
Select[Prime[Range[200]], ! SquareFreeQ[ 2^(#-1) - 1 ] && ! SquareFreeQ[ 2^(#+1) - 1 ] &] (* Robert Price, Feb 26 2017 *)
Select[Prime[Range[300]], NoneTrue[{2^(#-1)-1, 2^(#+1)-1}, SquareFreeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 14 2020 *)
PROG
(Magma) [p: p in PrimesUpTo(200) | not IsSquarefree(2^(p-1)-1) and not
IsSquarefree(2^(p+1)-1)];
(PARI) is(n)=isprime(n) && !issquarefree(2^(n-1)-1) && !issquarefree(2^(n+1)-1) \\ Charles R Greathouse IV, Aug 26 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Dec 27 2016
EXTENSIONS
Inserted terms 727 and 739 by Robert Price, Feb 26 2017
Added terms a(38)-a(54) by Robert Price, Feb 26 2017
STATUS
approved