login
A119598
Numbers that are repunits in four or more bases.
10
OFFSET
1,2
COMMENTS
Except for first term, numbers which can be represented as a string of three or more 1's in a base >=2 in more than one way; subset of A053696.
No more terms less than 2^44 = 17592186044416. - Ray Chandler, Jun 08 2006
Let the 4-tuple (a,b,m,n) be a solution to the exponential Diophantine equation (a^m-1)/(a-1)=(b^n-1)/(b-1) with a>1, b>a, m>2 and n>2. Then (a^m-1)/(a-1) is in this sequence. The terms 31 and 8191 correspond to the solutions (2,5,5,3) and (2,90,13,3), respectively. No other solutions with n=3 and b<10^5. The Mathematica code finds repunits in increasing order and prints solutions. - T. D. Noe, Jun 07 2006
Following the Goormaghtigh conjecture (Links), 31 and 8191 which are both Mersenne numbers, are the only primes which are Brazilian in two different bases. - Bernard Schott, Jun 25 2013
LINKS
Y. Bugeaud and T. N. Shorey, On the diophantine equation  (x^m - 1)/(x-1) = (y^n - 1)/(y-1), Pacific Journal of Mathematics 207:1 (2002), pp. 61-75.
Jon Grantham, No new Goormaghtigh primes up to 10^700, arXiv:2410.03677 [math.NT], 2024.
Eric Weisstein's World of Mathematics, Repunit
EXAMPLE
a(1)=1 is a repunit in every base. a(2)=31 is a repunit in bases 1, 2, 5 and 30. a(3)=8191 is a repunit in bases 1, 2, 90 and 8190.
31 and 8191 are Brazilian numbers in two different bases:
31 = 11111_2 = 111_5,
8191 = 1111111111111_2 = 111_90.
MATHEMATICA
fQ[n_] := Block[{d = Rest@Divisors[n - 1]}, Length@d > 2 && Length@Select[IntegerDigits[n, d], Union@# == {1} &] > 2]; Do[ If[ fQ@n, Print@n], {n, 10^8/3}] (* Robert G. Wilson v *)
nn=1000; pow=Table[3, {nn}]; t=Table[If[n==1, Infinity, (n^3-1)/(n-1)], {n, nn}]; While[pos=Flatten[Position[t, Min[t]]]; !MemberQ[pos, nn], If[Length[pos]>1, Print[{pos, pow[[pos]], t[[pos[[1]]]]}]]; Do[n=pos[[i]]; pow[[n]]++; t[[n]]=(n^pow[[n]]-1)/(n-1), {i, Length[pos]}]] (* T. D. Noe, Jun 07 2006 *)
PROG
(Python)
def isrep(n, b):
while n >= b:
n, r = divmod(n, b)
if r != 1: return False
return n == 1
def agen():
yield 1
n = 2
while True:
reps = 2 # n is a repunit in bases 1 and n-1
for b in range(2, n-1):
if isrep(n, b): reps += 1
if reps == 4: yield n; break
n += 1
for m in agen(): print(m) # Michael S. Branicky, Jan 31 2021
CROSSREFS
Cf. A053696 (numbers of the form (b^k-1)/(b-1)).
Cf. A145461: bases 5 and 90 are 2 exceptions (Goormaghtigh's conjecture).
Cf. A085104 (Brazilian primes).
Sequence in context: A059384 A136676 A135811 * A139295 A261947 A069451
KEYWORD
base,hard,more,nonn,bref
AUTHOR
Sergio Pimentel, Jun 01 2006
EXTENSIONS
Edited by Ray Chandler, Jun 08 2006
STATUS
approved