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!)
A328177 a(n) is the minimal value of the expression d OR (n/d) where d runs through the divisors of n and OR denotes the bitwise OR operator. 3
1, 3, 3, 2, 5, 3, 7, 6, 3, 7, 11, 6, 13, 7, 7, 4, 17, 7, 19, 5, 7, 11, 23, 6, 5, 15, 11, 7, 29, 7, 31, 12, 11, 19, 7, 6, 37, 19, 15, 13, 41, 7, 43, 15, 13, 23, 47, 12, 7, 15, 19, 13, 53, 15, 15, 14, 19, 31, 59, 13, 61, 31, 15, 8, 13, 15, 67, 21, 23, 15, 71, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
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
See A328176 and A328178 for similar sequences.
Cf. A218388.
Sequence in context: A110897 A116644 A166462 * A320776 A279056 A265751
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Oct 06 2019
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 April 23 13:11 EDT 2024. Contains 371913 sequences. (Running on oeis4.)