%I #17 Jul 17 2017 03:53:47
%S 1,1,3,19,1,4,3,19,24,50,1,18,4,3,7,86,19,44,24,50,56,16,1,18,23,49,4,
%T 42,3,8,7,177,86,185,19,100,44,52,24,225,50,478,56,16,47,1,5,85,18,43,
%U 23,49,55,15,4
%N Least position k of n (n written in base 2) in the infinite string 101110111110111101100011001110111... (i.e., 23571113171923... in base 2).
%e 1 appears as (1)0111..., 2 appears as (10)111011..., 3 as 10(11)10111..., 4 as 101110111110111101(100)0...
%p A189799 := proc(n)
%p local abin ,nbin ,nlen;
%p abin := ListTools[Reverse](convert(A154703(100),base,10)) ;
%p nbin := ListTools[Reverse](convert(n,base,2)) ;
%p nlen := nops(nbin) ;
%p for i from 1 do
%p if verify(nbin,[op(i..i+nlen-1,abin)],'sublist') then
%p return i;
%p end if;
%p end do:
%p return 0 ;
%p end proc:
%p seq(A189799(n),n=1..55) ; # _R. J. Mathar_, Jun 07 2011
%Y Cf. A004676, A007088, A154703.
%K nonn,base
%O 1,3
%A _Juri-Stepan Gerasimov_, May 24 2011
%E Corrected by _R. J. Mathar_, Jun 07 2011