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!)
A162215 a(n) is the smallest multiple of n that is greater than 2n and contains the same number of 1's in its binary representation as n contains. 1

%I #13 Feb 24 2019 21:09:23

%S 4,8,9,16,20,18,21,32,36,40,44,36,52,42,45,64,68,72,76,80,84,88,92,72,

%T 100,104,108,84,116,90,93,128,132,136,140,144,148,152,156,160,164,168,

%U 172,176,135,184,188,144,196,200,153,208,212,216,220,168,228,232,236

%N a(n) is the smallest multiple of n that is greater than 2n and contains the same number of 1's in its binary representation as n contains.

%C a(n) = 3n only if n is in sequence A077459. Otherwise, a(n) = 4n.

%H Michael De Vlieger, <a href="/A162215/b162215.txt">Table of n, a(n) for n = 1..10000</a>

%e 15 in binary is 1111, which contains four 1's as binary digits. 15*3 = 45, which is 101101 in binary. This also contains four 1's. So a(15) = 3*15 = 45.

%p A000120 := proc(n) add(d,d=convert(n,base,2)) ; end: A162215 := proc(n) local k; for k from 3 do if A000120(k*n)= A000120(n) then RETURN(k*n) ; fi; od: end: seq(A162215(n),n=1..80) ; # _R. J. Mathar_, Jul 04 2009

%t Array[Block[{k = 3, d = DigitCount[#, 2, 1]}, While[DigitCount[k #, 2, 1] != d, k++]; k #] &, 59] (* _Michael De Vlieger_, Feb 24 2019 *)

%Y Cf. A077459.

%K base,nonn

%O 1,1

%A _Leroy Quet_, Jun 28 2009

%E a(4) corrected and sequence extended by _R. J. Mathar_, Jul 04 2009

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:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)