A317173 a(n) is the least k > 0 such that k * n contains a digit 1 in its decimal representation.
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
Examples
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.
Programs
-
PARI
a(n) = for (k=1, oo, if (setsearch(Set(digits(k*n)), 1), return (k)))