login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A261892
Least multiple m of n such that n and m have no common one bit in their binary representations.
4
2, 4, 12, 8, 10, 24, 56, 16, 18, 20, 132, 48, 130, 112, 240, 32, 34, 36, 76, 40, 42, 264, 552, 96, 100, 260, 324, 224, 290, 480, 992, 64, 66, 68, 140, 72, 74, 152, 1560, 80, 82, 84, 516, 528, 450, 1104, 2256, 192, 196, 200, 204, 520, 1802, 648, 3080, 448
OFFSET
1,1
COMMENTS
All terms are even.
a(A003714(n)) = 2*A003714(n) for any n>0.
a(2n) = 2*a(n) for any n>0.
Without the condition on m being a multiple of n, then we'd get another sequence b(n) that seems to be A006519(n+1). - Michel Marcus, Sep 06 2015
FORMULA
a(n) = n*A261891(n) for any n>0.
EXAMPLE
For n=7:
+---+-----+---------------+-----------------+
| k | 7*k | 7*k in binary | Common one bits |
+---+-----+---------------+-----------------+
| 1 | 7 | 111 | 111 |
| 2 | 14 | 1110 | 110 |
| 3 | 21 | 10101 | 101 |
| 4 | 28 | 11100 | 100 |
| 5 | 35 | 100011 | 11 |
| 6 | 42 | 101010 | 10 |
| 7 | 49 | 110001 | 1 |
| 8 | 56 | 111000 | 0 |
+---+-----+---------------+-----------------+
Hence, a(7) = 56.
MATHEMATICA
Table[k = 1; While[BitAnd[k n, n] != 0, k++]; k n, {n, 60}] (* Michael De Vlieger, Sep 06 2015 *)
PROG
(Perl) sub a {
my $n = shift;
my $m = $n;
while ($n & $m) {
$m += $n;
}
return $m;
}
(PARI) a(n) = {k=1; while (bitand(n, k*n), k++); k*n; } \\ Michel Marcus, Sep 06 2015
(Python)
from itertools import count
def A261892(n): return next(k for k in count(n<<1, n) if not n&k) # Chai Wah Wu, Jul 19 2024
CROSSREFS
Sequence in context: A338118 A294063 A290096 * A278225 A186118 A352993
KEYWORD
nonn,base,look
AUTHOR
Paul Tek, Sep 05 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 23 05:13 EDT 2024. Contains 376143 sequences. (Running on oeis4.)