|
|
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
|
|
|
4, 8, 9, 16, 20, 18, 21, 32, 36, 40, 44, 36, 52, 42, 45, 64, 68, 72, 76, 80, 84, 88, 92, 72, 100, 104, 108, 84, 116, 90, 93, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 135, 184, 188, 144, 196, 200, 153, 208, 212, 216, 220, 168, 228, 232, 236
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(n) = 3n only if n is in sequence A077459. Otherwise, a(n) = 4n.
|
|
LINKS
|
|
|
EXAMPLE
|
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.
|
|
MAPLE
|
|
|
MATHEMATICA
|
Array[Block[{k = 3, d = DigitCount[#, 2, 1]}, While[DigitCount[k #, 2, 1] != d, k++]; k #] &, 59] (* Michael De Vlieger, Feb 24 2019 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
a(4) corrected and sequence extended by R. J. Mathar, Jul 04 2009
|
|
STATUS
|
approved
|
|
|
|