cp's OEIS Frontend

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.

A187965 Numbers k such that 2^k - 1 and 2^k + 1 are not squarefree.

Original entry on oeis.org

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

Views

Author

Keywords

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

Examples

			2^21 - 1 = 7^2 * 127 * 337, 2^21 + 1 = 3^2 * 43 * 5419.
		

Crossrefs

Cf. A243905 (multiplicative orders of 2 modulo p^2), A242777 (k+1 is prime).

Programs

  • Magma
    [n: n in [1..250] | not IsSquarefree(2^n-1) and not IsSquarefree(2^n+1)]; // Vincenzo Librandi, Nov 23 2015
  • 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 *)
  • 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
    

Extensions

More terms from Joerg Arndt, Nov 23 2015