OFFSET
1,1
COMMENTS
a(n) = 3n only if n is in sequence A077459. Otherwise, a(n) = 4n.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
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
Leroy Quet, Jun 28 2009
EXTENSIONS
a(4) corrected and sequence extended by R. J. Mathar, Jul 04 2009
STATUS
approved