%I #19 Jun 21 2023 06:40:42
%S 0,0,1,0,1,2,1,0,1,2,1,4,1,2,1,0,1,2,1,4,1,2,1,8,1,2,1,4,1,2,1,0,1,2,
%T 1,4,1,2,1,8,1,2,1,4,1,2,1,16,1,2,1,4,1,2,1,8,1,2,1,4,1,2,1,0,1,2,1,4,
%U 1,2,1,8,1,2,1,4,1,2,1,16,1,2,1,4,1,2,1,8,1,2,1,4,1,2,1,32,1,2,1,4,1,2,1,8
%N Smallest proper divisor of n which is a suffix of n in binary representation; a(n) = 0 if no such divisor exists.
%C By definition, identical to A006519 except that a(2^k) = 0 for all k.
%C a(3*2^k)=2^k and a(m)<2^k for m<3*2^k (see A007283).
%H Reinhard Zumkeller, <a href="/A080940/b080940.txt">Table of n, a(n) for n = 1..10000</a>
%e n=6='110', divisors<6: 1='1', 2='10' and 3='11', therefore a(6)=2='10';
%e n=7='111', divisors<7: 1='1', therefore a(7)=1;
%e n=8='1000', divisors<8: 1='1', 2='10' and 4='100', therefore a(8)=0.
%o (Haskell)
%o import Data.List (isPrefixOf); import Data.Function (on)
%o a080940 n = if null ds then 0 else head ds where
%o ds = filter ((flip isPrefixOf `on` a030308_row) n) $
%o a027751_row n
%o -- _Reinhard Zumkeller_, Mar 27 2014
%o (Python)
%o def A080940(n): return (m:=n&-n)*(m!=n) # _Chai Wah Wu_, Jun 20 2023
%Y Cf. A007088, A000079, A080941, A080942, A006519.
%Y Cf. A030308, A027751.
%K nonn,base,easy
%O 1,6
%A _Reinhard Zumkeller_, Feb 25 2003
%E Definition improved by _Reinhard Zumkeller_, Mar 27 2014