login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Least base B >= 2 such that the repunit (B^n-1)/(B-1) of length n is not squarefree.
0

%I #27 Feb 09 2024 08:01:19

%S 3,18,3,3,2,78,3,4,3,118,2,146,3,3,3,164,2,44,2,2,3,53,2,3,3,4,3,53,2,

%T 403,3,18,3,3,2,957,3,3,2,99,2,369,3,3,3,533,2,8,3,18,3,164,2,3,3,7,3,

%U 381,2

%N Least base B >= 2 such that the repunit (B^n-1)/(B-1) of length n is not squarefree.

%C When n is prime, a(n) seems to be hard to determine.

%C Let p be a prime == 1 (mod n) (such a prime exists by Dirichlet's theorem). Since gcd(n, phi(p)) > 1 there exists b such that 1 < b < p and b^n == 1 (mod p). Then x = b + y*p for suitable y has x^n == 1 (mod p^2), and x == b (mod p), i.e., (x^n-1)/(x-1) is divisible by p^2. Therefore a(n) <= x < p^2. - _Robert Israel_, Jul 24 2014

%e a(17)=164 because (164^17 - 1)/163 is not squarefree (is multiple of 103^2), and 164 is the minimal number with that property.

%p A:= proc(n) local x,F;

%p for x from 2 do F:= ifactors((x^n-1)/(x-1),easy)[2];

%p if max(seq(f[2],f=F)) >= 2

%p then return x

%p fi

%p od

%p end proc;

%p seq(A(n), n=2..50); # _Robert Israel_, Jul 24 2014

%o (PARI) for(n=2,100,b=2;while(issquarefree((b^n-1)/(b-1)),b++);print1(b,", "))

%K nonn

%O 2,1

%A _Jeppe Stig Nielsen_, Jul 24 2014