OFFSET
1,1
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1150
EXAMPLE
11 is present because there is no base b < 11 - 1 = 10 such that the representation of 11 in base b is a repdigit (all digits are equal). In fact, we have: 11 = 1011_2 = 102_3 = 23_4 = 21_5 = 15_6 = 14_7 = 13_8 = 12_9, and none of these representations are repdigits. - Bernard Schott, Jun 21 2017
MATHEMATICA
fQ[n_] := Block[{b = 2}, While[b < n - 1 && Length@ Union@ IntegerDigits[n, b] > 1, b++]; b+1 == n]; Select[1 + 2 Range@ 170, fQ]
PROG
(PARI) forstep(n=3, 300, 2, c=1; for(b=2, n-2, d=digits(n, b); if(vecmin(d)==vecmax(d), c=0; break)); if(c, print1(n, ", "))) \\ Derek Orr, May 27 2015
(Python)
from sympy.ntheory.factor_ import digits
l=[]
for n in range(3, 301, 2):
c=1
for b in range(2, n - 1):
d=digits(n, b)[1:]
if max(d)==min(d):
c=0
break
if c: l.append(n)
print(l) # Indranil Ghosh, Jun 22 2017, after PARI program
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel Lignon and Robert G. Wilson v, May 22 2015
STATUS
approved