OFFSET
1,4
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
a(10)=4 because 10 equals 1010 base 2 (repeating both 0 and 1), 101 base 3 (repeating 1), 22 base 4 (repeating 2) and 11 base 9 (repeating 1), and 20, 14, 13, 12 in the other bases < 10, not repeating digits.
MATHEMATICA
Table[n - 1 - Boole[n > 1] - Count[Range[2, n - 1], b_ /; UnsameQ @@ IntegerDigits[n, b]], {n, 99}] (* Michael De Vlieger, Jun 15 2017 *)
PROG
(PARI) a(n) = sum(b=2, n, d = digits(n, b); #d != #Set(d)); \\ Michel Marcus, Jun 13 2017
(PARI) a(n)=my(s=sqrtint(n)); sum(b=2, s, my(d=digits(n, b)); #Set(d)!=#d) + sum(k=1, n\(s+1), n%k==0 && n/k>s+1) \\ Charles R Greathouse IV, Jun 15 2017
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
André Engels, Jun 06 2017
STATUS
approved