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.

A288157 Number of bases b < n where the digits of n are not all different.

This page as a plain text file.
%I A288157 #15 Jun 15 2017 20:03:51
%S A288157 0,0,1,2,2,2,2,3,3,4,2,4,3,4,3,5,4,5,2,5,4,5,4,6,5,6,4,5,4,6,5,7,5,6,
%T A288157 4,8,6,5,4,7,5,7,6,6,6,7,5,8,6,8,5,6,4,6,6,7,7,6,5,11,7,7,7,10,7,7,6,
%U A288157 7,5,7,6,11,6,8,7,7,6,9,6,9,9,7,5,10,7,6,7,9,7,10,8,10,8,7,6,10,7,10,6
%N A288157 Number of bases b < n where the digits of n are not all different.
%H A288157 Charles R Greathouse IV, <a href="/A288157/b288157.txt">Table of n, a(n) for n = 1..10000</a>
%e A288157 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.
%t A288157 Table[n - 1 - Boole[n > 1] - Count[Range[2, n - 1], b_ /; UnsameQ @@ IntegerDigits[n, b]], {n, 99}] (* _Michael De Vlieger_, Jun 15 2017 *)
%o A288157 (PARI) a(n) = sum(b=2, n, d = digits(n, b); #d != #Set(d)); \\ _Michel Marcus_, Jun 13 2017
%o A288157 (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
%Y A288157 a(n) = n - 1 - A270832(n).
%K A288157 base,nonn,easy
%O A288157 1,4
%A A288157 _André Engels_, Jun 06 2017