Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A161764
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A161764 a(n) = the largest multiple of {the number of 1's in the binary representation of n} that is <= n. +0
2
1, 2, 2, 4, 4, 6, 6, 8, 8, 10, 9, 12, 12, 12, 12, 16, 16, 18, 18, 20, 21, 21, 20, 24, 24, 24, 24, 27, 28, 28, 30, 32, 32, 34, 33, 36, 36, 36, 36, 40, 39, 42, 40, 42, 44, 44, 45, 48, 48, 48, 48, 51, 52, 52, 55, 54, 56, 56, 55, 60, 60, 60, 60, 64, 64, 66, 66, 68, 69, 69, 68, 72, 72 (list; graph; listen)
OFFSET

1,2

EXAMPLE

11 (decimal) in binary is 1011. There are three 1's. Because 9 is the largest multiple of 3 that is <= 11, then a(11) = 9.

MAPLE

a := proc (n) local n2, n1, j: n2 := convert(n, base, 2): n1 := add(n2[i], i = 1 .. nops(n2)): for j while j*n1 <= n do j*n1 end do end proc: seq(a(n), n = 1 .. 80); [From Emeric Deutsch (deutsch(AT)duke.poly.edu), Jun 26 2009]

PROGRAM

(PARI) a(n)=local(B=binary(n), w=B*vector(#B, x, 1)~); n-n%w [From Hagen von Eitzen (math(AT)von-eitzen.de), Jun 22 2009]

CROSSREFS

A161765, A000120

Sequence in context: A096494 A116568 A061106 this_sequence A131055 A052928 A137501

Adjacent sequences: A161761 A161762 A161763 this_sequence A161765 A161766 A161767

KEYWORD

base,nonn

AUTHOR

Leroy Quet (q1qq2qqq3qqqq(AT)yahoo.com), Jun 18 2009

EXTENSIONS

Extended by Hagen von Eitzen (math(AT)von-eitzen.de) and Emeric Deutsch (deutsch(AT)duke.poly.edu), Jun 26 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research