OFFSET
1,2
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..16384
Rémy Sigrist, Logarithmic scatterplot of the first 2^16 terms
FORMULA
a(n)^2 >= n with equality iff n is a square.
a(p) = p for any odd prime number p.
EXAMPLE
For n = 12:
- we have the following values:
d 12/d d OR (12/d)
-- ---- -----------
1 12 13
2 6 6
3 4 7
4 3 7
6 2 6
12 1 13
- hence a(12) = min({6, 7, 13}) = 6.
MAPLE
a:= n-> min(map(d-> Bits[Or](d, n/d), numtheory[divisors](n))):
seq(a(n), n=1..100); # Alois P. Heinz, Oct 09 2019
PROG
(PARI) a(n) = vecmin(apply(d -> bitor(d, n/d), divisors(n)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Oct 06 2019
STATUS
approved