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.

A218403 Bitwise OR of all proper divisors of n; a(1) = 0 by convention.

This page as a plain text file.
%I A218403 #17 Feb 16 2025 08:33:18
%S A218403 0,1,1,3,1,3,1,7,3,7,1,7,1,7,7,15,1,15,1,15,7,11,1,15,5,15,11,15,1,15,
%T A218403 1,31,11,19,7,31,1,19,15,31,1,31,1,31,15,23,1,31,7,31,19,31,1,31,15,
%U A218403 31,19,31,1,31,1,31,31,63,13,63,1,55,23,47,1,63,1
%N A218403 Bitwise OR of all proper divisors of n; a(1) = 0 by convention.
%H A218403 Reinhard Zumkeller, <a href="/A218403/b218403.txt">Table of n, a(n) for n = 1..8191</a>
%H A218403 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/OR.html">OR</a>
%H A218403 Wikipedia, <a href="http://en.wikipedia.org/wiki/Binary_and#OR">Bitwise operation OR</a>
%H A218403 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A218403 a(n) <= A218388(n).
%F A218403 a(A000040(n)) = 1.
%F A218403 From _Antti Karttunen_, Oct 08 2017: (Start)
%F A218403 a(n) = A087207(A293214(n)).
%F A218403 A227320(n) <= a(n) <= A001065(n).
%F A218403 (End)
%e A218403 n=20: properDivisors(20) = {1, 2, 4, 5, 10}, 0001 OR 0010 OR 0100 OR 0101 OR 1010 = 1111 -> a(20) = 15;
%e A218403 n=21: properDivisors(21) = {1, 3, 7}, 001 OR 011 OR 111 = 111 -> a(21) = 7;
%e A218403 n=22: properDivisors(22) = {1, 2, 11}, 0001 OR 0010 OR 1011 = 1111 -> a(22) = 11;
%e A218403 n=23: properDivisors(23) = {1} -> a(23) = 23;
%e A218403 n=24: properDivisors(24) = {1, 2, 3, 4, 6, 8, 12}, 0001 OR 0010 OR 0011 OR 0100 OR 0110 OR 1000 OR 1100 = 1111 -> a(24) = 15;
%e A218403 n=25: properDivisors(25) = {1, 5}, 001 OR 101 = 101 -> a(25) = 5.
%t A218403 Table[BitOr@@Most[Divisors[n]],{n,80}] (* _Harvey P. Dale_, Nov 09 2012 *)
%o A218403 (Haskell)
%o A218403 import Data.Bits ((.|.))
%o A218403 a218403 = foldl (.|.)  0 . a027751_row :: Integer -> Integer
%o A218403 (PARI) A218403(n) = { my(s=0); fordiv(n,d,if(d<n,s = bitor(s,d))); s; }; \\ _Antti Karttunen_, Oct 08 2017
%Y A218403 Cf. A001065, A027751, A000225 (subsequence), A123345, A227320, A293214, A293215.
%K A218403 nonn,base,look
%O A218403 1,4
%A A218403 _Reinhard Zumkeller_, Oct 28 2012