login
A270032
a(n) is the smallest b for which the base-b representation of n contains at least one 6 (or 0 if no such base exists).
9
0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13, 7, 15, 8, 17, 9, 19, 10, 7, 11, 23, 8, 25, 13, 9, 7, 29, 10, 31, 8, 11, 17, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 7, 9, 9, 9, 9, 9, 9, 7, 10, 10, 10, 10, 10, 10, 7, 8, 11, 11, 11, 11, 11, 7, 12, 8, 12, 12, 12
OFFSET
1,6
COMMENTS
a(n) > 0 for n >= 13 since 16 is n written in base n-6.
The only perfect k-th powers (k >= 2) that can appear in this sequence are m^k with 2 <= m <= 6 and k a prime number.
MATHEMATICA
Table[SelectFirst[Range[7, 1200], DigitCount[n, #, 6] > 0 &], {n, 13, 120}] (* Michael De Vlieger, Mar 10 2016, Version 10 *)
PROG
(PARI) a(n) = if ((n<13) && (n!=6), 0, my(b=7); while(!vecsearch(Set(digits(n, b)), 6), b++); b); \\ Michel Marcus, Mar 10 2016
KEYWORD
nonn,base
AUTHOR
Nathan Fox, Mar 08 2016
STATUS
approved