This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A242777 #33 Sep 08 2022 08:46:08 %S A242777 31,79,151,211,271,311,331,547,571,613,631,691,751,811,859,991,1021, %T A242777 1051,1171 %N A242777 Primes p such that neither 2^p - 2 nor 2^p + 2 is squarefree. %C A242777 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 %e A242777 31 is in this sequence because 2^31 - 2 is divisible by 3^2 and 2^31 + 2 by 5^2. %t A242777 Select[Prime[Range[50]], ! SquareFreeQ[2^# - 2] && ! SquareFreeQ[2^# + 2] &] (* _Bruno Berselli_, May 29 2014 *) %t A242777 Select[Prime[Range[50]],NoneTrue[2^#+{2,-2},SquareFreeQ]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 10 2018 *) %o A242777 (Magma) [n: n in [2..250] | IsPrime(n) and not IsSquarefree(2^n - 2) and not IsSquarefree(2^n + 2)]; %o A242777 (PARI) is(n)=isprime(n) && !issquarefree(2^n-2) && !issquarefree(2^n+2) \\ _Charles R Greathouse IV_, May 29 2014 %o A242777 (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 %Y A242777 Cf. A013929, A187965. %K A242777 nonn,more %O A242777 1,1 %A A242777 _Juri-Stepan Gerasimov_, May 22 2014 %E A242777 Edited by _Jon E. Schoenfield_, May 25 2014 %E A242777 More terms added (based on terms in A187965) by _Jianing Song_, Jan 20 2021 %E A242777 a(19) from _Jinyuan Wang_, Feb 15 2021