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 A187965 #54 Sep 08 2022 08:45:56 %S A187965 21,30,63,78,90,105,110,147,150,189,204,210,231,234,270,273,310,315, %T A187965 330,340,357,390,399,441,450,465,483,510,525,546,550,567,570,609,612, %U A187965 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 %N A187965 Numbers k such that 2^k - 1 and 2^k + 1 are not squarefree. %C A187965 If k is in the sequence, then so is m*k for any odd m. - _Thomas Ordowski_, Nov 23 2015 %C A187965 Note that 110, 310, 340, 550, 770 are not divisible by 3. %C A187965 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 %e A187965 2^21 - 1 = 7^2 * 127 * 337, 2^21 + 1 = 3^2 * 43 * 5419. %t A187965 Select[ Range@ 500, !(SquareFreeQ[2^# - 1] || SquareFreeQ[2^# + 1]) &] %t A187965 Select[Range[1100],NoneTrue[2^#+{1,-1},SquareFreeQ]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jun 22 2019 *) %o A187965 (PARI) is(n) = !issquarefree(2^n-1) && !issquarefree(2^n+1); %o A187965 for(n=1, 1e3, if(is(n), print1(n, ", "))) \\ _Altug Alkan_, Nov 22 2015 %o A187965 (Magma) [n: n in [1..250] | not IsSquarefree(2^n-1) and not IsSquarefree(2^n+1)]; // _Vincenzo Librandi_, Nov 23 2015 %Y A187965 Cf. A005117, A049094, A049096. %Y A187965 Cf. A243905 (multiplicative orders of 2 modulo p^2), A242777 (k+1 is prime). %K A187965 nonn %O A187965 1,1 %A A187965 _Vladimir Joseph Stephan Orlovsky_, Mar 18 2011 %E A187965 More terms from _Joerg Arndt_, Nov 23 2015