|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
1 <= a(n) <= 5.
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
|
|
|
STATUS
|
approved
|
|
|
|