The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261891 Least k>0 such that n AND (k*n) = 0, where AND stands for the binary AND operator. 4
2, 2, 4, 2, 2, 4, 8, 2, 2, 2, 12, 4, 10, 8, 16, 2, 2, 2, 4, 2, 2, 12, 24, 4, 4, 10, 12, 8, 10, 16, 32, 2, 2, 2, 4, 2, 2, 4, 40, 2, 2, 2, 12, 12, 10, 24, 48, 4, 4, 4, 4, 10, 34, 12, 56, 8, 18, 10, 12, 16, 42, 32, 64, 2, 2, 2, 4, 2, 2, 4, 8, 2, 2, 2, 12, 4, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
All terms are even.
a(A003714(n)) = 2 for any n>0.
a(A004780(n)) > 2 for any n>0.
a(n) <= 2^A116361(n) for any n>0.
a(2n) = a(n) for any n>0.
LINKS
EXAMPLE
For n=7:
+---+-------------+
| k | 7 AND (k*7) |
| | (in binary) |
+---+-------------+
| 1 | 111 |
| 2 | 110 |
| 3 | 101 |
| 4 | 100 |
| 5 | 11 |
| 6 | 10 |
| 7 | 1 |
| 8 | 0 |
+---+-------------+
Hence, a(7) = 8.
MATHEMATICA
Table[k = 1; While[BitAnd[k n, n] != 0, k++]; k, {n, 60}] (* Michael De Vlieger, Sep 06 2015 *)
PROG
(Perl) sub a {
my $n = shift;
my $k = 1;
while ($n & ($k*$n)) {
$k++;
}
return $k;
}
(PARI) a(n) = {k=1; while (bitand(n, k*n), k++); k; } \\ Michel Marcus, Sep 06 2015
CROSSREFS
Sequence in context: A064145 A213431 A331985 * A321320 A366808 A175462
KEYWORD
nonn,base,look
AUTHOR
Paul Tek, Sep 05 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 May 21 10:20 EDT 2024. Contains 372735 sequences. (Running on oeis4.)