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!)
A080941 Greatest proper divisor of n which is a suffix of n in binary representation; a(n) = 0 if no such divisor exists. 9
0, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 4, 1, 2, 3, 0, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 3, 4, 1, 6, 1, 0, 1, 2, 1, 4, 1, 2, 3, 8, 1, 2, 1, 4, 5, 2, 1, 16, 1, 2, 3, 4, 1, 6, 1, 8, 1, 2, 1, 12, 1, 2, 7, 0, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 3, 4, 1, 6, 1, 16, 1, 2, 1, 4, 5, 2, 3, 8, 1, 10, 1, 4, 1, 2, 1, 32, 1, 2, 3, 4, 1, 6, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
a(n)=0 iff n=2^k (A000079);
LINKS
EXAMPLE
n=30='11110', divisors<30: 1='1', 2='10', 3='11', 5='101', 6='110', 10='1010' and 15='1111', therefore a(30)=2='10';
n=31='11111', divisors<31: 1='1', therefore a(31)=1;
n=32='100000', divisors<32: 1='1', 2='10', 4='100', 8='1000' and 16='10000', therefore a(32)=0.
PROG
(Haskell)
import Data.List (isPrefixOf); import Data.Function (on)
a080941 n = if null ds then 0 else head ds where
ds = filter ((flip isPrefixOf `on` a030308_row) n) $
reverse $ a027751_row n
-- Reinhard Zumkeller, Mar 27 2014
CROSSREFS
Sequence in context: A345221 A346633 A080940 * A346705 A177405 A362421
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Feb 25 2003
EXTENSIONS
Definition improved by Reinhard Zumkeller, Mar 27 2014
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 25 09:38 EDT 2024. Contains 371967 sequences. (Running on oeis4.)