login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216479 a(n) is the least multiple of n which uses only the digit 1, or a(n) = -1 if no such multiple exists. 3
1, -1, 111, -1, -1, -1, 111111, -1, 111111111, -1, 11, -1, 111111, -1, -1, -1, 1111111111111111, -1, 111111111111111111, -1, 111111, -1, 1111111111111111111111, -1, -1, -1, 111111111111111111111111111, -1, 1111111111111111111111111111, -1, 111111111111111, -1, 111111, -1, -1, -1, 111, -1, 111111, -1, 11111, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(n) = -1 if and only if n is a multiple of 2 or 5. See comment in A216485. - Chai Wah Wu, Jun 21 2015
LINKS
MATHEMATICA
Array[Which[GCD[#, 10] != 1, -1, Mod[#, 3] == 0, Block[{k = 1}, While[Mod[k, #] != 0, k = 10 k + 1]; k], True, (10^MultiplicativeOrder[10, #] - 1)/9] &, 42] (* Michael De Vlieger, Dec 11 2020 *)
PROG
(Python)
def A216479(n):
if n % 2 == 0 or n % 5 == 0:
return -1
rem = 1
while rem % n != 0:
rem = rem*10 + 1
return rem
# Azanul Haque, Nov 28 2020
CROSSREFS
Cf. A084681 (number of 1's), A190301 (multiplier).
Sequence in context: A280142 A077573 A266435 * A123698 A123727 A282915
KEYWORD
sign,base
AUTHOR
V. Raman, Sep 07 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)