login
A187965
Numbers k such that 2^k - 1 and 2^k + 1 are not squarefree.
1
21, 30, 63, 78, 90, 105, 110, 147, 150, 189, 204, 210, 231, 234, 270, 273, 310, 315, 330, 340, 357, 390, 399, 441, 450, 465, 483, 510, 525, 546, 550, 567, 570, 609, 612, 630, 651, 657, 666, 690, 693, 702, 735, 750, 759, 770, 777, 810, 819, 858, 861, 870, 903, 930, 945, 987, 990, 1014, 1020, 1029, 1050, 1071
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
Cf. A243905 (multiplicative orders of 2 modulo p^2), A242777 (k+1 is prime).
Sequence in context: A186455 A318081 A276655 * A318349 A228142 A276756
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Joerg Arndt, Nov 23 2015
STATUS
approved