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).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Benoit Cloitre, Plot of a((10^k+8)/18+x) for k=5 and -5555<=x<5555
Benoit Cloitre, Plot of a((10^k+8)/18+x) for k=5 and -55555<=x<55555
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
KEYWORD
AUTHOR
Benoit Cloitre, Dec 19 2012
STATUS
approved