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”).

Maximal run length in base-10 representation of n.
5

%I #22 Sep 27 2023 07:44:23

%S 1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,

%T 1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,

%U 1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,2

%N Maximal run length in base-10 representation of n.

%C The first term larger than 2 is a(111) = 3. - _M. F. Hasler_, Jul 21 2013

%H Paolo Xausa, <a href="/A043284/b043284.txt">Table of n, a(n) for n = 1..10000</a>

%F For n < 111, a(n) = 1 except for a(n) = 2 when n==0 (mod 11) or n = 100. - _M. F. Hasler_, Jul 21 2013

%t A043284[n_]:=Max[Map[Length,Split[IntegerDigits[n]]]];Array[A043284,100] (* _Paolo Xausa_, Sep 27 2023 *)

%o (PARI) A043284(n)={my(m,c=1);while(n>0,n%10==(n\=10)%10 && c++ && next;m=max(m,c);c=1);m} \\ _M. F. Hasler_, Jul 23 2013

%Y Cf. A043276-A043290 for base-2 to base-16 analogs.

%Y Cf. A030556-A030561, A030575-A030580 (related to base-6 run lengths).

%Y Cf. A227186, A227188, A101211, A005811 (related to base-2 run lengths).

%K nonn,base

%O 1,11

%A _Clark Kimberling_

%E Data completed up to a(100), first difference with A083230, by _M. F. Hasler_, Oct 18 2019