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!)
A218403 Bitwise OR of all proper divisors of n; a(1) = 0 by convention. 5
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, 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, 31, 19, 31, 1, 31, 1, 31, 31, 63, 13, 63, 1, 55, 23, 47, 1, 63, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
Eric Weisstein's World of Mathematics, OR
FORMULA
a(n) <= A218388(n).
a(A000040(n)) = 1.
From Antti Karttunen, Oct 08 2017: (Start)
a(n) = A087207(A293214(n)).
A227320(n) <= a(n) <= A001065(n).
(End)
EXAMPLE
n=20: properDivisors(20) = {1, 2, 4, 5, 10}, 0001 OR 0010 OR 0100 OR 0101 OR 1010 = 1111 -> a(20) = 15;
n=21: properDivisors(21) = {1, 3, 7}, 001 OR 011 OR 111 = 111 -> a(21) = 7;
n=22: properDivisors(22) = {1, 2, 11}, 0001 OR 0010 OR 1011 = 1111 -> a(22) = 11;
n=23: properDivisors(23) = {1} -> a(23) = 23;
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;
n=25: properDivisors(25) = {1, 5}, 001 OR 101 = 101 -> a(25) = 5.
MATHEMATICA
Table[BitOr@@Most[Divisors[n]], {n, 80}] (* Harvey P. Dale, Nov 09 2012 *)
PROG
(Haskell)
import Data.Bits ((.|.))
a218403 = foldl (.|.) 0 . a027751_row :: Integer -> Integer
(PARI) A218403(n) = { my(s=0); fordiv(n, d, if(d<n, s = bitor(s, d))); s; }; \\ Antti Karttunen, Oct 08 2017
CROSSREFS
Sequence in context: A135521 A344763 A176032 * A318506 A322382 A122410
KEYWORD
nonn,base,look
AUTHOR
Reinhard Zumkeller, Oct 28 2012
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 March 29 08:01 EDT 2024. Contains 371265 sequences. (Running on oeis4.)