OFFSET
1,4
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..16384
Rémy Sigrist, Scatterplot of the first 2^16 terms
FORMULA
EXAMPLE
For n = 12:
- we have the following values:
d 12/d d AND (12/d)
-- ---- ------------
1 12 0
2 6 2
3 4 0
4 3 0
6 2 2
12 1 0
- hence a(12) = max({0, 2}) = 2.
MAPLE
a:= n-> max(map(d-> Bits[And](d, n/d), numtheory[divisors](n))):
seq(a(n), n=1..100); # Alois P. Heinz, Oct 09 2019
PROG
(PARI) a(n) = vecmax(apply(d -> bitand(d, n/d), divisors(n)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Oct 06 2019
STATUS
approved