login
A317173
a(n) is the least k > 0 such that k * n contains a digit 1 in its decimal representation.
3
1, 5, 4, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 5, 5, 5, 4, 4, 3, 4, 4, 4, 1, 4, 4, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2
OFFSET
1,2
FORMULA
1 <= a(n) <= 5.
a(n) <= A190302(n).
a(n) = A317175(n, 1).
a(10 * n) = a(n).
EXAMPLE
The multiples of 3 are: 3, 6, 9, 12, 15, etc.; 12 is the first one containing the digit 1, hence a(3) = 12/3 = 4.
PROG
(PARI) a(n) = for (k=1, oo, if (setsearch(Set(digits(k*n)), 1), return (k)))
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Jul 23 2018
STATUS
approved