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!)
A030406 a(n)=least k such that base 4 representation of n begins at s(k), where s=A030401. 1

%I

%S 1,7,2,15,3,8,1,39,7,51,9,63,2,6,10,87,15,103,18,17,3,29,4,41,27,53,8,

%T 65,1,5,12,215,39,231,42,247,28,7,48,279,51,295,54,311,31,55,9,343,63,

%U 359,66,14,2,26,11,38,6,50,56,62,10,37,61,471

%N a(n)=least k such that base 4 representation of n begins at s(k), where s=A030401.

%H Robert Israel, <a href="/A030406/b030406.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = min(a(4*n),a(4*n+1),a(4*n+2),a(4*n+3)). - _Robert Israel_, Jun 27 2018

%p B:= cat("",op(map(op, [seq(ListTools[Reverse](convert(2*n-1,base,4)),n=1..500)]))):

%p g:= proc(n) local L,ns;

%p L:= convert(n,base,4);

%p ns:= cat("",seq(L[-i],i=1..nops(L)));

%p StringTools:-Search(ns,B);

%p end proc:

%p A:= NULL:

%p for n from 1 do

%p v:= g(n);

%p if v = 0 then break fi;

%p A:= A, v;

%p od:

%p A; # _Robert Israel_, Jun 27 2018

%Y Cf. A030401.

%K nonn,look

%O 1,2

%A _Clark Kimberling_

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 May 28 16:37 EDT 2022. Contains 354119 sequences. (Running on oeis4.)