This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A216479 #23 Dec 12 2020 05:19:35 %S A216479 1,-1,111,-1,-1,-1,111111,-1,111111111,-1,11,-1,111111,-1,-1,-1, %T A216479 1111111111111111,-1,111111111111111111,-1,111111,-1, %U A216479 1111111111111111111111,-1,-1,-1,111111111111111111111111111,-1,1111111111111111111111111111,-1,111111111111111,-1,111111,-1,-1,-1,111,-1,111111,-1,11111,-1 %N A216479 a(n) is the least multiple of n which uses only the digit 1, or a(n) = -1 if no such multiple exists. %C A216479 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 %H A216479 Chai Wah Wu, <a href="/A216479/b216479.txt">Table of n, a(n) for n = 1..1000</a> %t A216479 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 *) %o A216479 (Python) %o A216479 def A216479(n): %o A216479 if n % 2 == 0 or n % 5 == 0: %o A216479 return -1 %o A216479 rem = 1 %o A216479 while rem % n != 0: %o A216479 rem = rem*10 + 1 %o A216479 return rem %o A216479 # _Azanul Haque_, Nov 28 2020 %Y A216479 Cf. A084681 (number of 1's), A190301 (multiplier). %Y A216479 Cf. A004290, A079339, A181060, A181061. %K A216479 sign,base %O A216479 1,3 %A A216479 _V. Raman_, Sep 07 2012