%I #20 Sep 27 2023 06:32:57
%S 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
%T 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
%U 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1
%N Maximal run length in base 16 representation of n.
%H Antti Karttunen, <a href="/A043290/b043290.txt">Table of n, a(n) for n = 1..65537</a>
%t A043290[n_]:=Max[Map[Length,Split[IntegerDigits[n,16]]]];Array[A043290,100] (* _Paolo Xausa_, Sep 27 2023 *)
%o (PARI) A043290(n,b=16)={my(m,c=1);while(n>0,n%b==(n\=b)%b && c++ && next;m=max(m,c);c=1);m} \\ Use optional 2nd arg to get sequences A043276 through A043289. - _M. F. Hasler_, Jul 23 2013
%o (Python)
%o from itertools import groupby
%o def A043290(n): return max(len(list(g)) for k, g in groupby(hex(n)[2:])) # _Chai Wah Wu_, Mar 09 2023
%Y Cf. A043276, A043277, A043278, A043279, A043280, A043281, A043282, A043283, A043284, A043285, A043286, A043287, A043288, A043289 for base-2 to base-15 analogs.
%K nonn,base
%O 1,17
%A _Clark Kimberling_
%E More terms from _Antti Karttunen_, Sep 21 2018
|