OFFSET
1,1
COMMENTS
a(n) <= 2(10^n -1)/(9n). a(n) = -1 if and only if n is a multiple of 4 or 5. If n is a multiple of 4 then a(n) = -1 since 222....222 is not a multiple of 4. If n is a multiple of 5 then all multiples of n ends with the digit 0 or 5 and a(n) = -1. If n is odd and not a multiple of 4 or 5, then by the pigeonhole principle, two different repunits will have the same remainder modulo n. Their difference will be of the form 11...1110..0 which is a multiple of n. Since n and 10 are coprime, n is a divisor of a repunit and a(n) != -1. If n is even and not a multiple of 4 or 5, we take n/2 and use the same argument to show that n/2 is a divisor of a repunit and a(n) != -1. - Chai Wah Wu, Jun 21 2015
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1000
CROSSREFS
KEYWORD
sign,base
AUTHOR
V. Raman, Sep 07 2012
STATUS
approved