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!)
A216485 a(n) is the least value of k such that k*n uses only the digit 2, or a(n) = -1 if no such multiple exists. 2

%I #13 Jun 24 2015 09:29:29

%S 2,1,74,-1,-1,37,31746,-1,24691358,-1,2,-1,17094,15873,-1,-1,

%T 130718954248366,12345679,11695906432748538,-1,10582,1,

%U 96618357487922705314,-1,-1,8547,8230452674897119341563786,-1,76628352490421455938697318,-1,7168458781362,-1,6734,65359477124183,-1,-1,6,5847953216374269,5698,-1,542,5291,5167958656330749354

%N a(n) is the least value of k such that k*n uses only the digit 2, or a(n) = -1 if no such multiple exists.

%C 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

%H Chai Wah Wu, <a href="/A216485/b216485.txt">Table of n, a(n) for n = 1..1000</a>

%Y Cf. A004290, A079339, A181060, A181061.

%K sign,base

%O 1,1

%A _V. Raman_, Sep 07 2012

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 25 11:06 EDT 2024. Contains 371967 sequences. (Running on oeis4.)