|
|
A349932
|
|
Product of n and its binary ones' complement.
|
|
0
|
|
|
0, 2, 0, 12, 10, 6, 0, 56, 54, 50, 44, 36, 26, 14, 0, 240, 238, 234, 228, 220, 210, 198, 184, 168, 150, 130, 108, 84, 58, 30, 0, 992, 990, 986, 980, 972, 962, 950, 936, 920, 902, 882, 860, 836, 810, 782, 752, 720, 686, 650, 612, 572, 530, 486, 440, 392, 342, 290
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 9, a(9) = 0b1001 * 0b0110 = 9 * 6 = 54.
|
|
PROG
|
(Python)
def a(n): return 0 if n == 0 else n * (n^((1 << n.bit_length()) - 1))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|