A270026 a(n) is the smallest b for which the base-b representation of n contains at least one 0 (or 0 if no such base exists).
0, 2, 3, 2, 2, 2, 7, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1
Links
- Nathan Fox, Table of n, a(n) for n = 1..40000
- Eric Weisstein's World of Mathematics, Ternary
Programs
-
Mathematica
Table[SelectFirst[Range[2, 1200], DigitCount[n, #, 0] > 0 &], {n, 2, 120}] (* Michael De Vlieger, Mar 09 2016, Version 10 *)
-
PARI
a(n) = if (n==1, 0, my(b=2); while(vecmin(digits(n, b)), b++); b); \\ Michel Marcus, Mar 09 2016
Comments