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!)
A242777 Primes p such that neither 2^p - 2 nor 2^p + 2 is squarefree. 1
31, 79, 151, 211, 271, 311, 331, 547, 571, 613, 631, 691, 751, 811, 859, 991, 1021, 1051, 1171 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Primes p such that p-1 is in A187965. In particular, this sequence is infinite since all primes congruent to 31 mod 60 (79 mod 156, 111 mod 220, ...) are here. - Jianing Song, Jan 20 2021
LINKS
EXAMPLE
31 is in this sequence because 2^31 - 2 is divisible by 3^2 and 2^31 + 2 by 5^2.
MATHEMATICA
Select[Prime[Range[50]], ! SquareFreeQ[2^# - 2] && ! SquareFreeQ[2^# + 2] &] (* Bruno Berselli, May 29 2014 *)
Select[Prime[Range[50]], NoneTrue[2^#+{2, -2}, SquareFreeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 10 2018 *)
PROG
(Magma) [n: n in [2..250] | IsPrime(n) and not IsSquarefree(2^n - 2) and not IsSquarefree(2^n + 2)];
(PARI) is(n)=isprime(n) && !issquarefree(2^n-2) && !issquarefree(2^n+2) \\ Charles R Greathouse IV, May 29 2014
(Sage) [p for p in primes(250) if not is_squarefree(2^p-2) and not is_squarefree(2^p+2)] # Bruno Berselli, May 29 2014
CROSSREFS
Sequence in context: A033220 A139855 A139901 * A252231 A044169 A044550
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
Edited by Jon E. Schoenfield, May 25 2014
More terms added (based on terms in A187965) by Jianing Song, Jan 20 2021
a(19) from Jinyuan Wang, Feb 15 2021
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 April 18 06:24 EDT 2024. Contains 371769 sequences. (Running on oeis4.)