login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A218388
Bitwise OR of all divisors of n.
5
1, 3, 3, 7, 5, 7, 7, 15, 11, 15, 11, 15, 13, 15, 15, 31, 17, 31, 19, 31, 23, 31, 23, 31, 29, 31, 27, 31, 29, 31, 31, 63, 43, 51, 39, 63, 37, 55, 47, 63, 41, 63, 43, 63, 47, 63, 47, 63, 55, 63, 51, 63, 53, 63, 63, 63, 59, 63, 59, 63, 61, 63, 63, 127, 77, 127
OFFSET
1,2
COMMENTS
a(n) <= A003817(n); a(A000040(n)) = A000040(n).
LINKS
EXAMPLE
n=20: divisors(20) = {1, 2, 4, 5, 10, 20}, 00001 OR 00010 OR 00100 OR 00101 OR 01010 OR 10100 = 11111 -> a(20) = 31;
n=21: divisors(21) = {1, 3, 7, 21}, 00001 OR 00011 OR 00111 OR 10101 = 10111 -> a(21) = 23;
n=22: divisors(22) = {1, 2, 11, 22}, 00001 OR 00010 OR 01011 OR 10110 = 11111 -> a(22) = 31;
n=23: divisors(23) = {1, 23}, 00001 OR 10111 = 10111 -> a(23) = 23;
n=24: divisors(24) = {1, 2, 3, 4, 6, 8, 12, 24}, 00001 OR 00010 OR 00011 OR 00100 OR 00110 OR 01000 OR 01100 OR 11000 = 11111 -> a(24) = 31;
n=25: divisors(25) = {1, 5, 25}, 00001 OR 00101 OR 11001 = 11101 -> a(25) = 29.
MATHEMATICA
Table[BitOr@@Divisors[n], {n, 70}] (* Harvey P. Dale, Feb 27 2013 *)
PROG
(Haskell)
import Data.Bits ((.|.))
a218388 = foldl1 (.|.) . a027750_row :: Integer -> Integer
CROSSREFS
Cf. A027750, A000225 (subsequence), A123345, A218403.
Sequence in context: A318456 A209085 A086799 * A308340 A161427 A365212
KEYWORD
nonn,base,look
AUTHOR
Reinhard Zumkeller, Oct 27 2012
STATUS
approved