login
A190137
Least k in {1,2,3,4,5,6,7,8,9} such that all decimal digits of k*n are less than or equal to k.
1
1, 5, 4, 3, 2, 2, 3, 4, 5, 1, 1, 9, 8, 8, 7, 7, 6, 7, 6, 5, 5, 5, 5, 5, 4, 4, 5, 4, 5, 4, 4, 7, 4, 3, 4, 4, 3, 7, 6, 3, 3, 5, 5, 3, 5, 5, 5, 5, 5, 2, 2, 6, 4, 6, 2, 2, 6, 4, 6, 2, 2, 5, 5, 5, 5, 5, 3, 5, 5, 3, 3, 6, 7, 3, 4, 4, 3, 4, 7, 4, 4, 5, 4, 5, 4, 4, 5, 5, 5, 5, 5, 6, 7, 6, 7, 7, 8, 8, 9, 1
OFFSET
1,2
COMMENTS
a(n)=1 iff n is in A007088. This sequence contains symmetries around (10^k+8)/18 for any k>0 (see formula and link to some graphics).
FORMULA
If (10^k+8)/18-x-1>0 then a((10^k+8)/18+x)=a((10^k+8)/18-x-1)
EXAMPLE
1*57=57 and 5,7 >1, 2*57=114 and 4 >2, 3*57=171 and 7 >3, 4*57=228 and 8>4, 5*57=285 and 8>5, 6*57=342 and 3,4,2<=6 hence a(57)=6.
PROG
(PARI) a(n)=if(n<0, 0, t=1; while(vecmax(vector(ceil(log(n*t)/log(10))+1, i, floor(n*t/10^(i-1))%10))>t, t++); t)
(Haskell)
a190137 n = head [k | k <- [1..9],
all (<= "0123456789" !! k) $ show (k * n)]
-- Reinhard Zumkeller, Jul 07 2014
CROSSREFS
Sequence in context: A317173 A190302 A223475 * A003561 A201327 A329457
KEYWORD
nonn,base,look
AUTHOR
Benoit Cloitre, Dec 19 2012
STATUS
approved