OFFSET
1,1
COMMENTS
If k is in the sequence, then so is m*k for any odd m. - Thomas Ordowski, Nov 23 2015
Note that 110, 310, 340, 550, 770 are not divisible by 3.
Let b(p) be the multiplicative order of 2 modulo p^2. Then k is in this sequence if and only if there exists odd primes p, q such that b(p) | k and k == b(q)/2 (mod b(q)) with even b(q). For example, we have b(7) = 21, b(3) = 6 so b(7) | 21, 21 == b(3)/2 (mod b(3)), hence 21 is a term; likewise, b(3) = 6, b(5) = 20, so b(3) | 30, 30 == b(5)/2 (mod b(5)), hence 30 is a term. - Jianing Song, Jan 20 2021
EXAMPLE
2^21 - 1 = 7^2 * 127 * 337, 2^21 + 1 = 3^2 * 43 * 5419.
MATHEMATICA
Select[ Range@ 500, !(SquareFreeQ[2^# - 1] || SquareFreeQ[2^# + 1]) &]
Select[Range[1100], NoneTrue[2^#+{1, -1}, SquareFreeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 22 2019 *)
PROG
(PARI) is(n) = !issquarefree(2^n-1) && !issquarefree(2^n+1);
for(n=1, 1e3, if(is(n), print1(n, ", "))) \\ Altug Alkan, Nov 22 2015
(Magma) [n: n in [1..250] | not IsSquarefree(2^n-1) and not IsSquarefree(2^n+1)]; // Vincenzo Librandi, Nov 23 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Mar 18 2011
EXTENSIONS
More terms from Joerg Arndt, Nov 23 2015
STATUS
approved