login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A030406
a(n)=least k such that base 4 representation of n begins at s(k), where s=A030401.
1
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, 65, 1, 5, 12, 215, 39, 231, 42, 247, 28, 7, 48, 279, 51, 295, 54, 311, 31, 55, 9, 343, 63, 359, 66, 14, 2, 26, 11, 38, 6, 50, 56, 62, 10, 37, 61, 471
OFFSET
1,2
LINKS
FORMULA
a(n) = min(a(4*n),a(4*n+1),a(4*n+2),a(4*n+3)). - Robert Israel, Jun 27 2018
MAPLE
B:= cat("", op(map(op, [seq(ListTools[Reverse](convert(2*n-1, base, 4)), n=1..500)]))):
g:= proc(n) local L, ns;
L:= convert(n, base, 4);
ns:= cat("", seq(L[-i], i=1..nops(L)));
StringTools:-Search(ns, B);
end proc:
A:= NULL:
for n from 1 do
v:= g(n);
if v = 0 then break fi;
A:= A, v;
od:
A; # Robert Israel, Jun 27 2018
CROSSREFS
Cf. A030401.
Sequence in context: A070429 A050092 A293452 * A336194 A332209 A239975
KEYWORD
nonn,look
STATUS
approved