cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A218388 Bitwise OR of all divisors of n.

This page as a plain text file.
%I A218388 #16 Feb 16 2025 08:33:18
%S A218388 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,
%T A218388 31,27,31,29,31,31,63,43,51,39,63,37,55,47,63,41,63,43,63,47,63,47,63,
%U A218388 55,63,51,63,53,63,63,63,59,63,59,63,61,63,63,127,77,127
%N A218388 Bitwise OR of all divisors of n.
%C A218388 a(n) <= A003817(n); a(A000040(n)) = A000040(n).
%H A218388 Reinhard Zumkeller, <a href="/A218388/b218388.txt">Table of n, a(n) for n = 1..8191</a>
%H A218388 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/OR.html">OR</a>
%H A218388 Wikipedia, <a href="http://en.wikipedia.org/wiki/Binary_and#OR">Bitwise operation OR</a>
%H A218388 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%e A218388 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;
%e A218388 n=21: divisors(21) = {1, 3, 7, 21}, 00001 OR 00011 OR 00111 OR 10101 = 10111 -> a(21) = 23;
%e A218388 n=22: divisors(22) = {1, 2, 11, 22}, 00001 OR 00010 OR 01011 OR 10110 = 11111 -> a(22) = 31;
%e A218388 n=23: divisors(23) = {1, 23}, 00001 OR 10111 = 10111 -> a(23) = 23;
%e A218388 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;
%e A218388 n=25: divisors(25) = {1, 5, 25}, 00001 OR 00101 OR 11001 = 11101 -> a(25) = 29.
%t A218388 Table[BitOr@@Divisors[n],{n,70}] (* _Harvey P. Dale_, Feb 27 2013 *)
%o A218388 (Haskell)
%o A218388 import Data.Bits ((.|.))
%o A218388 a218388 = foldl1 (.|.) . a027750_row :: Integer -> Integer
%Y A218388 Cf. A027750, A000225 (subsequence), A123345, A218403.
%K A218388 nonn,base,look
%O A218388 1,2
%A A218388 _Reinhard Zumkeller_, Oct 27 2012