Disprove: If $\gcd(n,2^n-1)=1$, then $2^n-1$ is squarefree. 
Disprove: If $\gcd(n,2^n-1)=1$, then $2^n-1$ is squarefree.

Equivalently, if $2^n-1$ is not squarefree, then $\gcd(n,2^n-1)\neq 1.$
Exercise, which I do,says to show that statement above is false. I checked manually $n \leq 348$ by this page: https://www.alpertron.com.ar/ECM.HTM. Maybe I didn't notice some factor. I tried also by easy computing by supposing to have prime $q$ that $q^2|2^n-1.$
Can you please to provide me with any hint, but no solution.? 
 A: As written,  stringify accepts numbers only up to about 2,000,000,000 . However, putting such a large bound in the factoring routine would make it very, very slow. 
#include <iostream>
#include <stdlib.h>
#include <fstream>
#include <sstream>
#include <list>
#include <set>
#include <math.h>
#include <iomanip>
#include <string>
#include <algorithm>
#include <iterator>
#include <gmp.h>
#include <gmpxx.h>
using namespace std;


const int LARGEINT = 2147483647  ;
const int BILLION  = 1000000000  ;
const double my_pi = 4 * atan(1.0);

//  form.h      July2003  






string stringify(unsigned int x)
 {
   ostringstream o;
   o << x  ;
   return o.str();
 }




int mp_PrimeQ( mpz_class  i)
{
  if ( i <= 0 ) return 0;
  else if ( i == 1 ) return 1;
  else return  mpz_probab_prime_p( i.get_mpz_t() , 50 );
} // mp_PrimeQ


string mp_Factored_primebound( mpz_class  i, mpz_class bound)
{
  int squarefac = 0;
  string fac;
  fac = " = ";
  int p = 2;
   mpz_class  temp = i;
  if (temp < 0 )
  {
    temp *= -1;
    fac += " -1 * ";
  }

  if ( 1 == temp) fac += " 1 ";
  if ( temp > 1)
  {
    int primefac = 0;
    while( temp > 1 && p <= bound && p * p <= temp)
    {
      if (temp % p == 0)
      {
        ++primefac;
        if (primefac > 1) fac += " ";
         fac += stringify( p) ;
        temp /= p;
        int exponent = 1;
        while (temp % p == 0)
        {
          temp /= p;
          ++exponent;
        } // while p is fac
        if ( exponent > 1)
        {
          fac += "^" ;
          fac += stringify( exponent) ;
          if (p >2) ++squarefac ;
        }
      }  // if p is factor
      ++p;
    } // while p
    if (temp > 1 && primefac >= 1) fac += " ";
    if (temp > 1 && temp < bound * bound  ){ fac += " "; fac +=   temp.get_str()   ;}

       if (temp > 1 && temp >= bound * bound  ){ fac += " cdot mbox{BIG} "; }
    //  if (squarefac) fac += "      WOW " ;
  } // temp > 1
  return fac;
} // mp_Factored_primebound

