login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033921 Largest proper substring of 2^n that is a power of 2 (0 if none). 15

%I

%S 0,0,0,0,1,2,4,8,2,2,4,8,4,8,16,32,0,2,4,8,8,2,4,8,16,32,64,8,8,8,8,

%T 64,4,8,8,8,8,8,8,8,16,32,8,8,16,32,64,32,8,4,8,8,4,4,8,8,4,8,8,64,8,

%U 8,16,8,16,32,64,64,8,8,16,32,64,32,8,16,32,64,4,8,8,16,32,64,16,32,64,8,8

%N Largest proper substring of 2^n that is a power of 2 (0 if none).

%H Robert Israel, <a href="/A033921/b033921.txt">Table of n, a(n) for n = 0..10000</a>

%e 2^15={32}768, so a(15)=32.

%p for n from 0 to 100 do

%p L[n]:= sprintf("%d",2^n);

%p A[n]:= 0;

%p for k from n-1 by -1 to 0 do

%p if StringTools[Search](L[k],L[n]) <> 0 then

%p A[n]:= 2^k; break

%p fi

%p od

%p od:

%p seq(A[n],n=0..100); # _Robert Israel_, Aug 16 2018

%Y Cf. A000079.

%K nonn,base

%O 0,6

%A _N. J. A. Sloane_

%E More terms from _Patrick De Geest_, Jun 15 1998

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 14 01:28 EDT 2021. Contains 345016 sequences. (Running on oeis4.)