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.

Showing 1-1 of 1 results.

A119598 Numbers that are repunits in four or more bases.

Original entry on oeis.org

1, 31, 8191
Offset: 1

Views

Author

Sergio Pimentel, Jun 01 2006

Keywords

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

Examples

			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.
		

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).

Programs

  • 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 *)
  • 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

Extensions

Edited by Ray Chandler, Jun 08 2006
Showing 1-1 of 1 results.